Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Using the label of a custom field choice as input instead of the value

Avatar

Level 4

We have a custom form field where:

  • Label = Accountants, Value = ACS
  • Label = Payroll, Value = PRL

etc., but for this particular Fusion scenario I would like to use the label instead of the value for an input. Is there a way to do this?

0 Replies

Avatar

Level 10

The APIs that get the information work on the field value not the label, so not sure on a simple answer, unless you could us a switch? That is assuming the value and label is known in advance.

If the values are not known and possibly the fields are not known, you could use a custom API module and query the whole custom form like the below, this would return all fields and all values and labels, then iterate through each value till finding a match and get the label of that match.

/CTGY/{custom form ID}?fields=categoryParameters:parameter:parameterOptions:*

Or if you know the field ID

/PARAM/{custom field ID}?fields=parameterOptions:*

Avatar

Level 4

Thanks Ciaran! Yes I know the field and the values. It would only be for 1 field. I know I could just throw this in a Fusion data store but I'd rather base it off the Workfront field only. I was hoping it could be some kind of formula that I could put as an input in a module.

Avatar

Level 2

@Yvonne Miaoulis‚ We used have a IF( FIELD = 'Payroll', 'PRL', IF( FIELD = Accountants, ACS etc. etc. nested logic - but the overhead of maintaining it is not worth it. You have to figure out every reference to the field in scenarios and then update those formulas when you have new items added to your list. So I suggested reading from a Datastore - so now all we have to do is maintain the mappings in the data store - and point at that instead! Good thing we are in the same company - @Steffan Schmieder‚ can show you how he implemented it!