cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Personas 2.0: Dynamic selection of a table row

Former Member
0 Kudos

Hi together,

I have a requirement from my customer, where he wants that a Personas Script selects dynamically a row in a grid.

So here is the use case:

In the tabel you see bellow, I have to select always the first row, which has the output type "XDN1". My problem is, that I could not hard code which row to select, because the order of the row items in this table is different for each order.

What I have done till now:

I copy the hole table into a variable (Step 1 - outputTable) and then looping through the entries searching for the specific ordertype (step 2). When I have the row number I try to do a select/check of the complete row (step 3).

My script always fails in step 3. It seems like that the variable "index" cannot be resolved within the element id as a row number:


ses[0]/wnd[0]/usrUSRAREA/tblSAPDV70ATC_NAST3/colMarkerColumn[0]/cell[index]

Does anyone had the same issues? Or do you can think of a walkaround? Or maybe I am doing something wrong?

Thank you!

Best regards

Hristo

Accepted Solutions (1)

Accepted Solutions (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Try this:

Ü ses[0]

Calculate in JavaScript     args.cellid = 'ses[0]/wnd[0]/usrUSRAREA/tblSAPDV70ATC_NAST3/colMarkerColumn[0]/cell[' + args.index + ']';

Ü args.cellid

Check

Former Member
0 Kudos

Hi Tamas,

great thank you, this works!

Within the elemnt id field a standalone variable can be resolved, but a ID with an variable cannot be resolved... Good to know 🙂

Best regards

Hristo

Answers (1)

Answers (1)

pakula123
Participant
0 Kudos

Hi Hristo ,

There is a property called selectedrows . You can use it .

Check this link.

Hope it helps .

Best regards,

pradeep.

Former Member
0 Kudos

Hello Pradeep,

thanks, but I think this is only for Personas 3.0. I am still using Personas 2.0. There I don`t have any script action called "selectedRows".

Best regards

Hristo