I have a choice that is populated by a table with these columns: Impact Level, impact_level_id, sort_by, and Score
I am trying to add the impact level score of previous entries and display it on the form as in a text, “Current Unit Impact Level: (impact_sum)” etc. when I select a certain unit from another choice called Unit Select in the form.
I would also like to show the impending impact level that will result once an impact level is selected in the form choice. So it would be the sum of the previous impact level scores, plus the score of the selected impact level, and this should be updated in real time on the screen (like javascript or jquery etc) prior to the form being submitted.
However, I can’t get it to show even the result of the impact level selection in real time - just to show the choice selection in a text for now to ascertain if real time interaction is possible. I’m doing it in the Layout section, and would like to see “Medium” in a text if I select Medium in the choice.
Is this possible?
The equivalent might be showing the cost below an item, including tax and fees, when it is selected or highlighted. I’m thinking I should be able to do this.
I have various relations, lookup, math columns etc.
1 Like
Yeah, you can show a live value in the Layout when a Choice is made, but it works a little differently in Glide compared to JavaScript. In Glide you’d usually:
Add a user-specific column to temporarily store the selected Impact Level.
Use a relation + lookup to pull in the score of that selected Impact Level.
Then create a math column to add that score to the sum of previous entries.
Finally, display that math column as text (‘Current Unit Impact Level: X’).
That way, as soon as you pick something in the Choice component, it updates the value in real time on the screen before the form is submitted. I’ve set this up before for things like showing costs + fees when selecting an item, so I know it’s doable in Glide without custom code
1 Like
It most likely would need a custom form here.
How do you calculate the impact score in the previous entries, and the new entry? Is it related to any other stuff outside the form?
1 Like
It’s a little complex, I tried glide to save time compared instead of setting up a web app (but now dealing with lack of database relations), anyway it’s not working yet.
Currently I’ve got jurisdiction, unit type and unit choices pulling from their respective pages, the choice selected update to the user table in real time correctly and instantly (the data saves to the proper non user page columns upon form submission).
However, the query that collects precious entries with the same jurisdiction, unit type and unit does not fire when these user jurisdiction, unit type and unit is updated on the form by selextinf a difference one from the choice .
It’s then supposed to Roundup and sum the impact score from the queried entries to show the total impact score for that particular combo of entries (jurisdiction, unit type and unit) and show that value in a text, but it doesn’t update the score sum of I change the choice
Jurisdiction Boston, unit type vehicle, unit van should have a different Roundup score than New York jurisdiction, vehicle unity type and van unit
I can see the columns updating in real time in the user table, but the relating data columns are not firing when I change one of the choices
1 Like
Can you share some screenshots of the relevant tables/columns?
Maybe we can spot something that isn’t obvious to you.
1 Like
i got it working, i had it pointing to the wrong table at some point.
basically only the user table can update dynamically from choice selections (pointing choice to user table columns), then doing calculations in data columns in the user table (query, roundup, math etc) and then inserting those data column results into text components on the form, to update text in real time whenever a new choice selection is made. this is a good system, i appreciate that.
1 Like