How would you update the choices of a list picker?

I have an in-house app and my hope is that once it is done, I rarely (if ever) need to update the app on the device with a new version of the app.

The app scans a barcode (which is just the employee’s name). If someone forgets their ID badge at home, they can instead choose their name from a drop-down list (List Picker component). The data is sent to the PHP script and this all works 100%.

Now, if we hire someone new, and someone leaves our group, I obviously need to update the drop-down list on the app. My idea is to have a method to push the updated list of employee names to the drop-down list. I get the updated list by running a PHP script which queries the database (works 100%).

Then I need to send data to the app. I have been using a Web component and the “response content” field. But… it is not working.

There is a procedure that I call which does the fetching.
blocks(1)

Then, the Web component:

Here’s the procedure that is called from within the Web component.
blocks(3)

The List Picker isn’t updated - the old list is there without the additions or changes. I’ve had myself and a colleague go over the code all day yesterday, and no idea where there is an error. We’ve read many posts, etc. Still nothing. Maybe you see an error and maybe you’d send the data in a different way?

Thanks.
Any ideas?

So weird. 7 hours yesterday and nothing.

Tonight, no changes to the code and it works.

Something is up. There is no explanation for this.

1st rule of coding, if it works then don’t touch it! :joy:

1 Like