Show Hint when no options for choice exist

Feel like this should be such a simple thing, but I’m having a hard time wrapping my head around it.

I have a calculator that I’m working on. I want the user to be able to select a lighting fixture using the drop down menu, then below select the configuration of the light using the chips. The reason I am having them select the light is because I’m pulling information from the database to include in the calculation.

For the chips I have made it so that it filters the data so it only shows lights that have a beam angle.

Screen Shot 2023-02-23 at 10.43.54 AM

I would love to make a red hint pop up if a light doesn’t have any configurations that have beam angle stored to say “No Beam Angle Available for this Lighting Fixture”

I can’t quite figure out how to do it though. Have tried a combination of if statements on the relation column to check to see if its empty, but that didn’t work…Any other ideas on how to accomplish this?

Thought well, I should probably display the beam angle that is from the selected light, thought that might be my solution…

Screen Shot 2023-02-23 at 12.22.05 PM

Only issue is when I go to select a different light, the beam angle stays in there from the last selection…so thats no good.

Screen Shot 2023-02-23 at 12.23.06 PM
Selected a different light, you can see the fixture detail chips is gone because there is no beam angle for this light, but the Beam Angle is still at 58 from the last selection.

Hows the Beam Angle configured? Is it just another column of the Light Fixture?

I would think you can show a Hint with a Visibility setting of “If Beam Angle is empty”, then display Hint Component

I made it so you can copy the app and look, but basically there is a sheet for this beam diameter calculator. I use a relation column which pulls from the choice fields to get the relation, then I use a look up to pull the beam angle in.

Heres the sheet with all the lighting unit configurations in it.

e

I think I see your issue.

Your Lookup is based on Fixture details. Therefore, if you select a 1K Baby 3200 Flood, its looking up that Beam Angle. But when you switch the Fixture to something else, the Fixture Detail isnt changed until you select a new Fixture detail. Some of your Fixtures dont have a Fixture detail so there is no way the Beam Angle to change.

This is the solution I could think of:

Add a USC Boolean Column in your Beam Calculator Table
Add 2 Buttons at the very bottom of your App
Button #1 “Search” has an Action of Set Column - Boolean: True
Button #2 “Reset” has an Action of Set Column - Boolean : True + Fixture Details: Clear Value

For your components visibility:

The below have IF Boolean is NOT CHECKED
Fixture Choice
Fixture Details Choice
Hint

The below have IF Boolean is CHECKED
Everything else

This way, when someone chooses a Fixture, they hit Search, which hides the 2 choice components, preventing them from changing them and then reveals all the details associated to that Fixture. If they want to search something else, they hit “Reset” and it clears the Fixture Detail, hides all the prior metrics and reshows the 2x Choice Components

For your No Angle Hint issue, simply add a Hint Component with a Visibility of “IF Lookup Angle is Empty, display this Hint” AND IF Boolean is CHECKED

There might be a cleaner way without the use of a button. I’ll let others chime in.

Ok going to give something a shot here! Thank you. Button is very interesting.

I actually think I figured out a very simple solution for this one. I was looking at it today and had a moment of realization.

I set the default value of beam angle to be zero. Then on this page, I just said if its zero, then make my hint visible and the beam angle not visible. If its not zero, then only make the beam angle field visible.

So here it is when no beam angle is there.

Screen Shot 2023-02-24 at 2.57.44 PM

and then when there is a beam angle.

Screen Shot 2023-02-24 at 2.58.36 PM

Thanks for letting me think out loud on here!

@RyanThomas - I took the liberty of taking a look at your App, and I have some feedback/suggestions for you.

Firstly, you have non-User Specific Columns in your Beam Calculator table. Assuming that you intend to have more than one user of your App, then this will cause you problems. When you have two or more users interacting with that screen at the same time, every time one makes a selection, the selection will change for all the others. User Specific Columns address this problem, as it allows each user to have their own version of the data in the same column/row.

So you need to change the following columns:

Secondly, you have redundant data in your tables. What I mean by this is that you have a Lighting Fixture column in your Lighting Units table, and then another column for Lighting Fixture in your Lighting Unit Configurations table. You then use those in a relation between the two tables. Using item names in this way to form relations is not recommended, because of its fragility. Names can change, and when they do, things will break. For example, there are two rows in your Lighting Unit Configurations table that have no matching row in your Lighting Units table. Row 41 (600D Pro) - maybe that should be Aputure 600D Pro?, and Row 63 (Litemat Spectrum), which I’m guessing should be Litemat 4 Spectrum?

A better approach to this is to create a single source of truth for your Lighting Units, and have everything else refer back to that. Then if you ever need to change a name, it only needs to be changed in one place, and nothing will break.

The way to do this is by adding a RowID column to your Lighting Units table, and use that as a LightingID in other tables. So in your Lighting Unit Configurations table, instead of storing the unit name, store the UnitID. If you need the name in that table, all you need to do is create a relation matching the UnitID with the RowID column in the Lighting Units table, and then use a lookup column via that relation.

Just getting back to your original question, the way I would deal with that is to use the selected Fixture to build a multiple relation back to your Lighting Unit Configurations table, use a lookup column to fetch an array of associated Beam Angles, and then use the state of that array (empty or not) to decide what to display.

Below is a link to a copyable version of your App with the above changes implemented.

4 Likes

Finally had some time to look at this, thanks so much! Appreciate all the work you did on this. Definitely improved it a lot.