I want to have a counter that decreases by one whenever a radio button is selected in the gallery. Currently the one I have works, but it resets whenever the app is closed. My app brings in previous responses with a lookup. How can I get the counter to stay at what it was previously at? If I reopened the app and submitted 10 radio buttons last time it would still say 46. Also, instead of me saying their are 46 radio buttons is there a way it could countRows of blank radio buttons. In my onselect for my counter I have Set(varRadioButtonSelectedCounter, 46); In the onchange for the radiobutton I have Set(varRadioButtonSelectedCounter, varRadioButtonSelectedCounter - 1); The default of the radio button is If(var,"",
LookUp(GUATResponses, Title=vUserMail && GUATListID=ThisItem.ID, RadioValue) . The text label of the counter is varRadioButtonSelectedCounter
Solved! Go to Solution.
@powerapps890 If the previous user entries are overwritten/updated the date is not relevant anymore for this. Could you try with a simple CountIf(GUATResponses, Title = vUserMail)
@powerapps890 Not sure if I completely understand your issue. Variables are all blank upon starting an app. I'd suggest you either patch/update your external datasource upon closing the app/submitting responses (e.g. in a one row table) or use a hidden label inside the app that stores the current value; and retrieve it either from the external table or text label upon opening the app.
How do I do this? Like I said ListData has the patched values and looks them up when you reload the app. So i need to include these in the count @TJO . I just want the label to count how many buttons their old total and count it down every time a radio button is selected.
@powerapps890 It's a bit difficult to understand your issue...could you show a screenshot of the table to be patched and one from the app with the counter on it?
@powerapps890 So if I get this right, is this per user...each user has 46 radios to check and the 4th column of your 1st pic (rows 1- 😎 mean it is the input of the user # 1?
And in your data table...is there a row for each user and each radio selection?
@powerapps890 Is see, so each user has a set of 46 rows for each session/submit, and each user may have multiple submissions?
I guess you need to use a relatively complex lookup or create a collection. Does each data row have the submit date?
Yes the date is attached to each row. Yes, they can submit multiple times because it removes the data and then updates it when the submission button is pressed. @TJO