cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Delay and Patch

I have an app that has 2 buttons - One button to collect data and one button saves the data back to the sharepoint datasource.  The information that is collected is based on a gallery select item, then text inputs look-up the values associated with the selected item.  My issue is....when pressing the button, the values for the textboxes are not always there when the collection is gathered.  I assume that it's a timing issue because when I execute the button several times in a row, the collection is successful, or if I press the button for 2 or more seconds, the collection is there.   Is there a way to delay the button to allow the text inputs to populate?  I have tried a timer, but I don't understand how to attach it to the button.

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Delay and Patch

@TerrificTerri 

That seems like a strange behaviour.  There is no delay in values being in the controls that you would have to account for...unless you have some type of formula on them that will be performing a looking.

So, rather than try to account for that, could you consider changing how you are collecting the information?

You say that "the information is collected based on a gallery selected item, then text inputs look-up the values associated with the selected item" Perhaps consider having the information you need already in the selected item.  Then your text inputs would simply be Galleryx.Selected.columnName and your Update formula on the button could be Collect(AllResponses, {'Assistant1 Response': ThisItem.columnName, ....

I find in most all of our apps that going to the datasource once for what you want (all of it...as much as possible) is better on little issues like that.

 

I hope that helps a bit.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Delay and Patch

@TerrificTerri 

That seems like a strange behaviour.  There is no delay in values being in the controls that you would have to account for...unless you have some type of formula on them that will be performing a looking.

So, rather than try to account for that, could you consider changing how you are collecting the information?

You say that "the information is collected based on a gallery selected item, then text inputs look-up the values associated with the selected item" Perhaps consider having the information you need already in the selected item.  Then your text inputs would simply be Galleryx.Selected.columnName and your Update formula on the button could be Collect(AllResponses, {'Assistant1 Response': ThisItem.columnName, ....

I find in most all of our apps that going to the datasource once for what you want (all of it...as much as possible) is better on little issues like that.

 

I hope that helps a bit.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Re: Delay and Patch

@RandyHayes The lookup values are coming from a different list.  Thank you so much for your response.  

Super User
Super User

Re: Delay and Patch

@TerrificTerri 

So again, you can still bring those into your Gallery in the Items property...they would be there then.

Otherwise, consider changing your update OnSelect to use the same lookup associated with the text input rather than the text input control itself.

So in other words (or formulas) -  Collect(AllResponses, {'Assistant1 Response': theLookupFormulaYouHaveOntxtAssistant1Response, ....

 

Personally, I like getting them at the time of Gallery load, only because then there is only 1 formula for the lookup to be maintained.

   Gallery Items:  AddColumns(yourOriginalItemsDataSource, "Assistant1Response", theLookupFormulaYouHaveOntxtAssistant1Reponse, "Assistant2Reponse", the LookupFormulaYoHaveOntxtAssistant2Reponse, ....

 

Then, your text input for Assistant1 Reponse would be Galleryx.Selected.Assistant1Response, and so on.

Your OnSelect on the button would be Collect(AllReponses, {'Assistant1 Reponse':ThisItem.Assistant1Response, ...

 

This could (theoretically) marginally slow down the initial Gallery load (although I have yet to see any impact from it). But it sure is nice to have good data "in hand" rather than going back to get it and dealing with the delay.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Re: Delay and Patch

@RandyHayes POW  Right between the eyes!  Totally awesome!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,818)