Hi All,
I want to make an application using mobile App in outsystem version 11.
I have range slider in that i have min- idv and max idv value getting from API, And range slider we have min,max, and starting value that are also getting from api but its not working in app if i am giving static value here so its working fine but input value taking wrong not btw min idv or max idv and if i give dynamic value fetching from api so it taking so much time and not showing proper result in input field.. Can anyone help me?
Hello Ritu,
The fact that you are getting your values for an API can be the cause of your problem.
You mentioned that the API takes a long time to fetch the data and being an API data is fetched Asyncronly while the UI is rendered.
To help with this you can hide the slider ( and other values from the API ) until you have tour results. This will ensure that you only show the user the correct value.
To do this you can create a local boolean variable ( ex: IsLoading, with the default value set to true ) and wrap the slider in an IF statement using that variable as a condition.
And then when you confirm that the API data was received you can change the value to false, showing your widgets with the correct values.
Hope it helps!
Paulo Rosário
Hi Ritu,
Place your range slider under an IF condition on the UI. Then the condition for IF condition should be set to MyAPIDataFetch.IsDataFetched.
This will make sure the RangeSlider would only be displayed after the data is fetched. In that case it will have its initial value available because the data is already fetched from API.
Hi Ravi,
Now Value is Coming, But I am Facing New issue, when i am scrolling the slider its again going to initial point, i am scrolling the slider btw min idv and max idv value is taking correct input value but scroll in not coming btw both idv values min or max.
Input value must be used only for the initialization time. For changing the value once it has been rendered on your UI, you can use another client action for setting up the new value
In my module there is no setRangeSliderValue in client action, how can i set the value..
You can add this dependency in your module. It is part of OutsystemsUI module. You can find it by clicking on Manage Dependencies (Ctrl+Q), then select OutsystemsUI and find SetRangeSliderValue on the right side list.
Were you able to fix it with using the client action that I suggested?