Optimizing Dropdown Load and Data Fetching Speed in App

Matthew Howard:
I am having trouble getting a dropdown to display information from the app properly. From the get go, with the onformload it sets the model from the app with an ID that is used to get managing officers from FileMaker. However, in the new modal it takes awhile for it to run and display the drop down. If I have the “.name” afterwards it never displays, and if I take the “.name” off. The drop down will eventually display, but with the entire array.

I need the drop downs to just display the names, and then once selected it will use the IDs associated with them.

image

image

image

image

image


Jason Perry:
@Linxue Ren


Linxue Ren:
Hi, in your selectOptions add "label": "name" that will let the option shows only name of the object. Then your values_calc can reference the object. On select it will pass the object with the id.


Matthew Howard:
Thank you so much. It works like a charm.

Do you have an idea, on how to trigger/load the information faster? It takes a little while for the drop down to display.


Linxue Ren:
you can try to cache data in model.managingOfficer and sync with app. If the data is huge you can set a hook to trigger search and then load the option values after that.


Delfs:
Hmmm it should show instantly. Are you fetching data after some event and fms is slow?


Matthew Howard:
The Liquor License ID is already stored in the App. However, when I open the modal I need the ID to be passed to FM. With OnFormLoad I set that, but it never really triggers. So I have a run utility attached to it to get it to trigger.


Delfs:
Ok so it sound like there is another issue and fetching is slow ?


Matthew Howard:
Do you have any recommendations on how to speed up the process? Early in the process I could have it capture the information and store it in the App model.


Delfs:
yeah basically if its based on Liquor License ID and that does not change in the users session, you can prefetch it.