9
Views
4
Comments
Solved
Time lapse in button appearance and disappearance.
Question

Hi, I am working on a form and In that form I load the data from REST Api. In the form there is a "submit"  button which I am showing and hiding based on the form status. Basically if form is in it's "Final" state hide "submit" button. I am able to show and hide button based on form status but when I open a submitted form of status "Final" submit button takes some time(2-3 seconds) to disappear. 

Thanks

Rank: #1254
Solution

Hi Nannu,

The data fetch from the DB might be taking the time lapse you're experiencing. In such a case reduce the On start fetch entities from your screen and use on after fetch event of the entity that contains the Status.

Use a boolean flag/CSS to show/hid your button

If that doesn't work you can use a screen input variable to check the visibility condition beforehand. 

Hope this helps

mvp_badge
MVP
Rank: #89

Hi Nannu, 

I would suggest you to encapsulate the Form Button (within True branch) with IF widget and the applied IF condition will be...

e.g. assuming that the Data Source action calling the REST Service defined under the Screen scope is RESTResponse

RESTResponse.IsDataFetched and RESTResponse.Form.status = "Final"

IsDataFetched is a DataSource Action/Aggregate runtime property/flag, using which we can check the attempt of DataSource action flow execution


Hope this helps you!


Regards,

Benjith Sam

Rank: #79609

but when I open a submitted form of status "Final" submit button takes some time(2-3 seconds) to disappear.