Using the label of a custom field choice as input instead of the value | Community
Skip to main content
Level 4
April 8, 2021
Question

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

  • April 8, 2021
  • 2 replies
  • 1012 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Level 4
April 9, 2021

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:*

YvonneMi2Author
Level 4
April 15, 2021

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.

Level 2
April 16, 2021

@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!

YvonneMi2Author
Level 4
April 22, 2021

Thanks for confirming my suspicions, Greg!