cancel
Showing results for 
Search instead for 
Did you mean: 

Manipulating checkboxes in Personas

Former Member
0 Kudos

I'm trying to simplify the transaction MK02 (change vendor master) by bringing data from several different places to the main "Display Vendor: Address" screen of the transaction. Ultimately the transaction will be called by a script initiated by a button on SMEN, and that script will pull all the data together before giving the user control. I'm doing pretty well with this so far, but have hit a problem with the blocked and deleted flags. These are accessed via the "Extras" menu, and the "Blocked data" and "Deletion flags" options.

I can navigate to those screens and do a "Copy Value" on each checkbox, but I always seem to get the value "False" whether the checkbox is checked or not. At least, when I paste the copied value into a text field, that's the value I get. Is there something different I need to do to get the value of a checkbox?

And then I want to replicate these checkboxes on the initial screen. I've created some new checkboxes with appropriate labels. Once I've got the correct values, how to I set them on my new checkbox objects? Pasting values to those objects sets the labels not the state. There are "Check" and "Uncheck" actions for scripts, so I guess I need to use an IF and the appropriate check/uncheck action. I haven't really figured out, though, how IF actions work. Can anybody help me with this?

As a general point, the scripting capabilities of Personas needs much better documentation...

Thanks,

Steve.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Copying checkbox values is something that appeared in Personas SP03.

Steve.

Former Member
0 Kudos

Steve,

Did you use an IF clause or did you somehow copy and paste the value? 

I'm not coming up with an elegant solution.

FYI: funny, I'm developing a flavor for Vendor Master too!

Former Member
0 Kudos

Since SP03 you can use copy/paste I believe.

Steve.

Answers (1)

Answers (1)

TobiasQueck
Advisor
Advisor
0 Kudos

Hi Steve,

after reading through your scenario description, I tried to reproduce it in GUIT (my favorite transaction for testing Personas features.).

  1. I went to screen 500, added a new checkbox and tried copying the value of an existing checkbox and pasted it to the new checkbox. As you pointed out, paste value changed the label of the new check box instead of marking it as checked.  So, as you already guessed, you need to use IF conditions to achieve the goal. IF conditions use the content of fields for the evaluation, therefore, I needed to add an additional textbox to temporarily paste the copied value, then evaluated the if condition and depending on whether the value was "true" or "false" I checked or unchecked the checkbox. Last but not least, I hid the textbox since  it doesn't need to be seen.
    • I think this description underlines your point of more documentation for the scripting is needed. I will discuss this with the Personas KM team. In addition, do you have any specific suggestions of what would help? More examples, how tos, or more detailed descriptions?
  2. Next I tried exactly the same but with the custom checkboxes on a different screen. And, as you also found out, it did not work as expected, the result was always false.
    • I will investigate this further with the development team.

Cheers,

Tobias.

Former Member
0 Kudos

Thanks Tobias. At least I know it isn't me misunderstanding something. I'll leave this particular task and look at other things until a fix is available.

As for what further documentation is needed, then I would say we need more of everything. In the example of "if" I found it mentioned in a video how-to here on SCN but I've seen no other mention of it anywhere. Formal documentation of it, its capabilities and how to create it in the script editor should be available. For example, is it if-then or if-then-else? I can't tell. When you add it to an existing script, I can see than adding new steps afterwards become the "then" part, but how do I move an existing step to the "then". I'd say we need this documentation for all of the different step types. For many it is obvious how they are used and what they do, but sometimes I wonder if there are other less obvious capabilities.

The same is true, I think, for all of the UI components also. There are some things I've only found because I know they are there - I've seen you demo them, so I looked until I found them. One example of that is table caching. An an aside - is there a way of programmatically manipulating the object properties? Another example - the documentation describes how to link a text field and a button, but doesn't actually say what that linking achieves.

I think SCN is a great place for examples and how-tos in video or blog format. Once I'm a bit more familiar with it I'd be happy to blog some of my examples. But we do need much of this in the form of formal documentation also.

Steve.

Former Member
0 Kudos

For info, this still seems to be a problem in 1.02. I have now created an OSS message for it.

Steve.

Former Member
0 Kudos

And the answer from OSS is:

I'm sorry to tell you that now we don't have any plan for supporting this functionality

So no copying checkboxes from one screen of a transaction to another . That's a little disappointing...

Steve.