de
Novice

Get ID of selected ListView Row

Hi Mates,

 

Can you please let me know how i can assign of selected row ID data to lable?

I have ListVIew once your selected any item from ListView i want to capture the row ID in on lable so how we can achive this?

 

Its possible to capture ID's of multiple selected items in ListView ?

 

 

Thanks 

0 Kudos
Reply
5 Replies
JohanL
Apprentice

Re: Get ID of selected ListView Row

Hi,

 

Configure a new rule on: When a view executes a method.

Configure this on List Item click.

Configure a transfer data action.

Configure as follows:

Expand the SmartObject and drag the ID property to your Data Label.

Finish the rule.

 

During runtime K2 will know which record was clicked and will transfer the ID to the Data Label.

 

To my knowledge you cannot do this for multiple selections.

For something like that consider using a Multi-Select control bound to a list method and have the user select the applicable ones.

This data is then stored as a semi-colon separated list.

 

Hope this helps!

Regards,

JohanL

Reply
de
Novice

Re: Get ID of selected ListView Row

Hi,

Thanks for you reply.

 

I want to have approve/reject button against each item hence i had added the button control in listview item but when i run the view i canot able to see those buttons on forms.

what will be the issue?

0 Kudos
Reply
JohanL
Apprentice

Re: Get ID of selected ListView Row

Hi,

 

Buttons don't work in the rows of a List view.

 

Your alternative is to create two Toolbar buttons, one for approve and one for decline and then when the user clicks on one of the rows and click the button, that it then approve/decline the item which was clicked on.

 

Hope this helps!

Regards,

JohanL

0 Kudos
Reply
de
Novice

Re: Get ID of selected ListView Row

 Hi Johan

 

I have added the Toolbar buttons Approve and reject in listview items on design times i can see those at each level. but i run the view i am not  able to see those button appears on listview. 

Do we need to set any rule?

 

Thanks

0 Kudos
Reply
JohanL
Apprentice

Re: Get ID of selected ListView Row

Hi,

 

See my screenshots attached, hopefully it will explain it better.

 

Regards,

JohanL


approverejectbuttons_1547.png
listitemclickrules_1548.png
approvebuttonrule_1549.png
0 Kudos
Reply