I’m building a competition judging app with about 30 questions, each requiring a description of criteria and such.
Instead of a big wall of text between each question, I’m trying to build tooltips by using an Action Row with a (?) button that fires a ‘Show Detail Screen’ action with the ‘Slide In’ target.
I’m using a relation column in my ‘In Progress Form’ table that links to a ‘Criteria Description’ table, displaying the correct row’s value in the Details Screen ‘tooltip’.
My question is this: Currently for each question I have to create a new custom action that first manually sets the lookup value for the relation column to use, and then displays the ‘tooltip’. Doing this for every question in the app is going to be tedious and prone to error, so is there a way to only create one custom action, which sets the lookup column’s value to the label of the Action Row that was clicked? Doing so would allow me to just ensure that the ‘Name’ field in the ‘Criteria Description’ table was the same as the label of each Action Row (which it already is).
I hope my explanation makes sense, and it’s something that can be done!
Looks like you already know what step in the process you are at (eg. 3 of 8), so you can take advantage of that. If I assume that the current step value is stored in a user specific column somewhere, then the following should work:
In your Criteria Description table, add a single value column that applies the current step value to all rows. Depending on screen context, that may or may not be straight forward, but it will be possible.
Then in your slide in screen, it should simply be a matter of using a collection and filtering by step value.
Hi Darren, thanks for getting back to me!
My example screen above is a bit flawed sorry - there will actually be 5 or so questions on screen at one time (all with their own Action Row, which will ideally have its own hint text), so the step will be the same for each of the 5 questions.
There’s ~30 questions in the survey, so hopefully there’s a way to do it without splitting it into 30 pages
And I also see now that I didn’t do a very good job of reading your question the first time around
No, I don’t believe that’s possible. At least not with an action row component. It would be easy with a collection.
hmm, now that I’ve read your question properly and have a better understanding, there is no solution that immediately jumps out at me. I’ll ponder it a bit, and in the meantime somebody else might jump in with a good solution.
Yeah I’m using Apps not Pages so I think Collections aren’t available to me, right?
Ah well, seems like it’d be easier to go through and make a unique action for each Action Row - I’ve probably spent more time looking for a faster solution than I would have on just doing the slower way Ain’t that the way
No, you’re definitely using Pages. I can tell from your screenshots. So using a collection could be an option, depending on how your questions are structured.
(even if you were using Aps, then the equivalent option would be an inline list)
Whoops! I thought I’d created an App but I guess not With that in mind, what would be the method to dynamically show/hide the description text in a collection? I’m definitely not married to my Action Bar workaround, I’d love a more elegant solution
This could possibly be a good use case for a custom collection.
How are your questions arranged in your tables? Are they all in a single column across multiple rows?
If yes - could you combine them with your Criteria Descriptions in a single table?
I think that would be the easiest - then use a custom collection to display the questions, and use an action to show/hide the Criteria Description for each associated question.
I’m not sure how your navigation through the questions is currently setup, but whatever it is it should be possible to emulate using a collection.
You talked about an “In Progress Form” - so I assume that you’re using some kind of custom form (with an associated helper table?), rather than a native form?
Do responses to all questions get saved as a single row?
Oh man, thank you! I feel like the custom collection element is the missing piece that’s brought everything together for me!
I’ve updated my tables to work better with the custom collection (hopefully!), but the only trouble I’m having now is getting the submitted data into my output ‘Submissions’ table. This is what I have, please let me know if I’ve gone wrong somewhere:
Question table: each question is a row, with columns for ‘Name’, ‘Description’, ‘Step’, and a user specific column for answer. ‘Step’ is just used in a visibility toggle in the custom collection’s filter, where if a user presses a ‘Continue’ button it increments the step value, and so displays the next section of questions. ‘Name’ and ‘Answer’ are presented in the custom collection, with ‘Name’ having an action to display ‘Description’ in a slide-in details screen. The ‘Answer’ column stores the user’s answers, which is where I’m having trouble.
Before, I’d store answers in an ‘In Progress Form’ table, which had a single row, and every column was user specific. In the ‘Submit’ button, I’d map that row into a new row in a submissions table (essentially the same columns, just not user-specific), then clear the ‘In Progress Form’ row ready for another submission.
With answer now being saved in a column (in the ‘Questions’ table) and not a row, how do I map them to a submission row when the form is submitted?
Or have I yet again been manually doing work when Glide has a native solution?
mmm, that’s a bit fiddly, but doable.
Probably what you will need to do is use a series of Single Value columns to pick out the answers one by one. Each Single Value column will target N from start, where N is an incrementing number beginning at 0. You can then use those single value columns in your Add Row action.
The problem with the above is that it comes with some maintenance overhead. For example, if you ever need to add or remove questions, then you’ll need to reconfigure things.
A more elegant approach would be to bundle all of the responses up together (possibly as a JSON structure) and save that in a single column. That would be more work to set up, but would be easier to maintain and would scale much better.
The second solution definitely appeals to me more - this whole exercise was trying to get away from hardcoded values, so it would suck to just add more somewhere else
I feel like you’ve more than answered my original question, so I’ll mark this as done, but if I have trouble with the json structure you’ll see me on the forum again Wish me luck!
I want to avoid hard coded values, so that refactoring is faster in the long run. So instead of spending one hour building the app, and possibly another hour refactoring it down the road, I’ve spent eight hours trying to make it scalable. So much time saved