Local Storage Use

I have a set of dropdowns that a user selects, country, state and country working via the backendless db but that utilises a number of api calls and seems overkill for data that would not change and require the app to have data connection to function.

I am trying to move that function over to use local storage instead but I’m not sure how I populate the ‘country-selection’ dropdown from the local storage data.

Below is my codeless setup on page enter

Could you try without Convert to Text block?

If it still doesn’t work. Please set up a minimal reproducible example on a separate page.

Regards, Dima.

Thanks for the reply Dima,

I tried this


s

The page only has a single select dropdown with the id ‘country-selection’

Hi Peter,

I replicated your logic and it is working for me:
https://www.backendless.us/api/files/ui-builder/containers/support/index.html?page=localstorage

Here’s the logic:

Regards,
Mark

Thanks Mark,

I have the same code logic but it only seems to show ‘Option 1’, ‘Option 2’ and 'Option 3 in my down down, so I must have something set wrong elsewhere.
I’ll have a dig around and get back if i find the cause.

Hi Peter,

If you share your app ID and the name of the page, I’ll be happy to look into it.

Regards,
Mark

Thanks Mark,

App id is B93AC9BD-D6C7-A31F-FF26-2384D140BB00
The page is just called ‘Location’

The problem is right here:

If you remove that empty connector, it will work.

Brilliant. Thank you so much Mark. I would never have spotted that and would have been tearing my hair out.

All working now