How to reinitialise and clear the selected value from a list / reinitialise the list widget in an array ?

166 views
Skip to first unread message

yoke-le...@lafargeholcim.com

unread,
Aug 24, 2018, 7:37:55 AM8/24/18
to Fujitsu RunMyProcess Developer Community
I have an array with 2 column of List widget. I defaulted the array row to 5 rows and not active. When I click on a button, it will auto populate the list of compulsory approver names + their titles into the List widget in the array (based on company and amount field). As long I have not submit, I can keep changing the fields value and click on the button to auto repopulate the approvers list.

Eg :
If company = A and amount <= 10000, it will have 2 approvers
If company = A and amount >= 10001, it will have 3 approvers
Problem

Problem is that I need to reinitialise all the 5 rows back to no selection before I repopulate the correct list again into the array. But I cannot properly clear the previous auto populated values.

If the new approver list is > = to the previous number of rows, then no issue. But if the new approver list is < than the previous number of approver rows, then it will still show the extra approvers from the previous population.

I have tried the below 2 but still not working

id_my_array_fixed_approvers.id_ fixed_appr_title [i].setSelectedValue("");
id_my_array_fixed_approvers.id_fixed_appr_title[i].reset();

See attachement

how to reinitialise list widget in array.pdf

Pankaj Kumar

unread,
Aug 29, 2018, 8:08:26 PM8/29/18
to Fujitsu RunMyProcess Developer Community
Hi,

To clear the previous selection in the list, please use the "reset" method.(attached screen-print)

for(var i = 0;i<=tot_arr_row;i++){
id_my_array_fixed_approvers.id_fixed_approvers[i].reset();
alert ("done clear value for row =" + i);
}

To repopulate the list with different value in list, once the variable based list is reinitialize, please use below method:-

id_array.id_vblist_label[P_index].setListVariableName("vb_list_name");
id_parray.id_vblist_label[P_index].loadList();

Kindly let me know if I misunderstand the query.

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/2d845029-f5bc-4d08-811e-ac2f15de3a4a%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.
1.png

yoke-le...@lafargeholcim.com

unread,
Aug 30, 2018, 3:48:23 AM8/30/18
to Fujitsu RunMyProcess Developer Community
Good day Pankaj,

I did tried using reset() as mentioned in my previous attachment (pic also included)

Problem with reset()
Originally, based on criteria, it auto populate 3 approvers. Then I change the values and it auto repolutae to 2 approver. In the form, the reset() seem to be working fine. But after submit and check at it process instance, you will see there is 3 rows of approver in the array and the last row is captured as blank.

By right, the array should show 2 rows (2 approvers) and not 3 rows (with the last row = blank).

I now try to redo the whole thing with addrow and delete row. But i may need to revert back to this ori design if add row and delete row also cannot work.


Pankaj Kumar

unread,
Aug 30, 2018, 5:24:09 PM8/30/18
to Fujitsu RunMyProcess Developer Community
Hi,

To completely reset the List selected value, kindly use the code provided on below RunMyProcess Developer Guide link:-



Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

yoke-le...@lafargeholcim.com

unread,
Sep 3, 2018, 1:43:44 AM9/3/18
to Fujitsu RunMyProcess Developer Community
Good day Pankaj,

Thank you. It is working now

Reply all
Reply to author
Forward
0 new messages