Trying to Update List Picker Elements from Web

I am having an issue with updating the elements in my list picker. I have attached an image showing the relevant blocks. I am using the variable SelectionList to store the list of elements. I am using a couple of labels (TestLbl) to see the value of the list at various points.

When I run, TestLbl2 gets populated with the value I expect to receive from the web, say ["A","B","C"]. But when I output the same variable again later at TestLbl1, I instead get what I initialized the list to, ["1","2"].

It seems like the value does not get updated outside of the Web Get until after the list picker is executed. If I select the list picker a second time the elements are correct. I have also verified that the value of SelectionList is what I would expect between executions of the list picker. I have tried inserting a time delay between when the Web Get is called and the elements are updated, but that does not work regardless of the delay, the elements for the list picker always come from the initialized values.

I would appreciate any help in how the value of SelectionList is being set and what I can do to get the list picker elements updated the way I desire.

Two issues....

  1. You "set the listpicker elements" in the beforepicking event, this is before the web component has returned the values, hence why you have to run it a second time. Try with the "set listpicker elements" in the Web1.Gottext event block, after the list has been created.

  2. However, calling the web component Web1.Get in the beforePicking event and doing the above may be OK, but the listpicker may still be shown anyway without the updated elements. Try using a button, and then call the listpicker to open in the Web1.GotText event (after you have set the elements!)

  1. I have tried this, it does not work. Even if the test label I created gets the value I expect, the elements for the list picker do not get updated.

  2. This worked. Thank you, I didn't even think of calling the list picker within the web component even though I was doing it the opposite way.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.