cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Personas 2.0 script for validating a field

ghoward25
Explorer
0 Kudos

Hello,

I am attempting what I think to be a pretty simple script in Screen Personas 2.0 to check a value of one field with a record type in CO19 ="B30", and then attempting to populate another field with a value of 0 based on this previous field.  However, it seems that I must be missing something as this will not work for me -->

Any help - much appreciated.

Regards,

Gary

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

That looks on the face of it to be correct. What are you expecting to happen, and what actually does happen?

Steve.

ghoward25
Explorer
0 Kudos

Wow Steve that was a quick response - very much appreciated.

Basically I am attempting to populate a Yield value of "0" if the B30 record type (Interrupt of processing) is active on this screen which it is.  When I run the script, nothing happens, I have even tried to apply a quantity into the yield expecting this to be overwritten with the "0" value but this doesn't do anything either when running the script.

Regards,

Gary

Former Member
0 Kudos

Debugging Personas 2 scripts is not straightforward. Here are a couple of things I'd do:

  • add a custom field on this screen and simply copy the value from the "Record type" field to this customer field (copy value/paste value), and see what you get. This will confirm that you are testing the right thing.
  • add a simple "Enter value" action on the "Yield value" field to make sure you are referencing the right field and that you can put stuff into it

Which transaction is this? It doesn't look familiar, so I'm guessing I might be able to sensibly try it in my system to see what happens.

Steve.

ghoward25
Explorer
0 Kudos

Hello Steve,

I have tested again with a custom field, and read the B30 field without quotes, and after entering all the mandatory fields, I ran the script again.  It populates a custom field with the quantity 0.

So I changed this to the field for Yield field, run the script and nothing.  Changed back to the custom field and hey presto "0" is entered.

I then added two steps for a copy and paste, and still nothing is pasted.

So, I thought what if the value is the fact that the ZERO value is the issue, changing my value to 1EA to see what happens, it works, leaving me to conclude that a zero value in this field is represented as a Null -->

Thanks for your help, just discussing that I was doing the right thing has helped me solved this.

Regards,

Gary

Former Member
0 Kudos

You're welcome! The same things happens to me, sometimes. I know the transaction so well that the script is obviously right, but when you break it down into smaller steps, the problem makes itself clear.

Steve.

Answers (1)

Answers (1)

0 Kudos

hi gary,

get rid of double quotes from "B30" in your equals action.

Sushant

Former Member
0 Kudos
ghoward25
Explorer
0 Kudos

Hello Steve,

I had tried it with and without the quotes and the B30 record type and it was the same effect, no data copied into the Yield field.

This transaction is for Time event recording in the Production environment.  A production order in this case uses CO19 to record set-up, processing etc, in the event of a processing Interrupt, the system allows you to enter a yield value to say you made x but now are stopping with the operation on the production order for whatever reason.  Could be a break etc.If you use Process Orders then CORZ is the equivalent transaction.

Regards,

Gary