Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,413
Community Members
 
Community Events
168
Community Groups

ConfiForms: Show text dependent on field value in table view (using if-condition ?)

I've a form collecting information about hardware ownership in our company.

There is one user-field in the form having fieldname owner.

By the third symbol of the owner's username I can derive the employee relationship (employee or contractor).

How do I add a column in table view labeled "employee relationship" that shows "contractor" in case of the username has a "9" as third symbol. In all other cases the column should show "employee".

I've tried to achive this using a if-condition in the form field macro. This didn't work, the column was not displayed at all.
confiforms-field-macro.PNG

Field name value:

IF([entry.owner.id.trimLeft(2).trunc(1)]==9,"contractor","employee")

Thanks for your help
Christian

1 answer

1 accepted

0 votes
Answer accepted

Hi

You cannot use the formulas directly in the field name, but you can do it through the virtual function. And evaluateFormula  function should be able to help

Set the field name to something like

id.evaluateFormula(IF([entry.owner.id.trimLeft(2).trunc(1)]==9,"contractor","employee"))

 Alex

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events