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.
Field name value:
IF([entry.owner.id.trimLeft(2).trunc(1)]==9,"contractor","employee")
Thanks for your help
Christian
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.