I have a column that is an Enum type that dis...

I have a column that is an Enum type that displays images in my app. I am using an expression in another column similar to โ€œContains([Front Head Type],โ€œblahโ€)โ€ that performs some calculations based on the Enum selection.

The images are all stored in the drive folder and end in .jpg. No problems getting them to display however, the enum columns [Front Head Type] & [Rear Head Type] are referenced in the display name of other columns as well as in a workflow. I would like to get rid of the file type โ€œ.jpgโ€ in the string. Iโ€™ve looked through the documentation and tried the following without any success.

In App: SUBSTITUTE([Front Head Type],".jpg","")

In Workflow: <<SUBSTITUTE([Front Head Type],".jpg","") >>

Error messages state โ€œParameter 1 of Substitute is used incorrectlyโ€, any idea how i can modify the string to remove โ€œ.jpgโ€ as is not relevant to anyone using the app or workflow but simply part of the file name used in the enum?

1 8 406
8 REPLIES 8

I believe SUBSTITUTE requires a text column type, whereas your Enumโ€™s BaseType is image; try something like this; it should work:

SUBSTITUTE(TEXT([Front Head Type]), โ€œ.jpgโ€, โ€œโ€)

Yep, that was it, Thank you Reza!

Youโ€™re welcome!

@Joe_Birk working with some exchangers there I see!

I would like to know how to make an enum with images ?. I understood that they could be text only

@Grant_Stead, good eye!

@FREDY_ORTEGON, here is a sample app for using images in an enum list.

appsheet.com - Images in buttons - How to use images in Enum buttons Images in buttons - How to use images in Enum buttons appsheet.com

@Joe_Birk Iโ€™ve managed plenty of refinery turnarounds, so I know all about tearing into some exchangers!

@Joe_Birk thank you!!!

Top Labels in this Space