In my app, I have a column for the price (A Table) of an item, and 4 other subsequent columns with markup values based on that price by percentage (5%, 10$, 15%, 20%, 25%). Each row is a different item therefore has a different price there for have different markup values. I would like to create a dropown that copmresses all of the markup values into one column. So if the price of an item is $100, I would like the 4 different markup values to be in one dropdown. As of now, I have the price column and 4 different markup value columns which takes up a lot of space. Iโm hoping there is some sort of Valid_if function that would allow me to do this.
Solved! Go to Solution.
hI @Nick_Neumann,
Good to know it works. For adding percentage values to the dropdown your valid_if expression couldbe something like
LIST(CONCATENATE("5 % - ",[A Table]*1.05),CONCATENATE("10 % - ",[A Table]*1.10), CONCATENATE("15 % - ",[A Table]*1.15), CONCATENATE("20 % - ",[A Table]*1.20), CONCATENATE("25 % - ",[A Table]*1.25))
Please note that the above expression will change the return value type and hence column base type from price to text. This is so because now we have prefixed a text string to those markup values, thereby converting the return value to a text string.
Thus please do change the base type of the enum column from Price to Text.
Hi @Nick_Neumann,
You could create a combined Markup column of Enum type and base type as โPriceโ with valid_if expression of
LIST([A Table]*1.05,[A Table]*1.10, [A Table]*1.15, [A Table]*1.20, [A Table]*1.25)
As a better elements naming practice, you may also wish to rename the [A Table] column to some other name such as Item Prices or something similar. The reason is โTableโ word is generally associated with a spreadsheet or database table.
Suvrutt, Thanks for the reply! This seemed to work perfectly except when I go to actually use the dropdown and save the chosen value, it gives e an error saying โThis entry is invalidโ!
Hi @Nick_Neumann,
Is it possible that you can share the screenshot of the column settings for the new enum column?
Suvrutt,
Thanks again for responding again, and by you asking me that, I realized I actually didnโt change it to an Enum type. That did the trick, thank you!!! One more question though, How would I adjust the List expression to include the % in the dropdown. So it would read, โ5% - $105โ, โ10% - $110โ, etc. within the dropdown?
hI @Nick_Neumann,
Good to know it works. For adding percentage values to the dropdown your valid_if expression couldbe something like
LIST(CONCATENATE("5 % - ",[A Table]*1.05),CONCATENATE("10 % - ",[A Table]*1.10), CONCATENATE("15 % - ",[A Table]*1.15), CONCATENATE("20 % - ",[A Table]*1.20), CONCATENATE("25 % - ",[A Table]*1.25))
Please note that the above expression will change the return value type and hence column base type from price to text. This is so because now we have prefixed a text string to those markup values, thereby converting the return value to a text string.
Thus please do change the base type of the enum column from Price to Text.
Worked perfectly. Thanks again Suvrutt!
User | Count |
---|---|
44 | |
29 | |
23 | |
20 | |
15 |