Creating dropdown of multiple column values within row

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 Solved
0 6 834
1 ACCEPTED 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.

View solution in original post

6 REPLIES 6

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โ€!

Screen Shot 2020-03-04 at 9.14.19 AM|678x408

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!

Top Labels in this Space