Action: Field: Field Formulas -->Text formula syntax doesn't work
Hello, dear Sir/Madam:
I followed the example from https://help.catalytic.com/docs/field-field-formulas/#text-formula-syntax.
I set field {{professor-name}} to Maya Sanchez.
I use the formula fields['professor-name'].indexOf(‘Sanchez’), expects the result to be 5.
However the action can't run.
See screenshot
Best Answer
-
Hi there, thanks for posting your question on Community.
Sorry you encountered this problem, we understand it can be frustrating when a suggestion from the Help Center doesn't work as intended.
We looked at the help article you posted and found a syntax error that explains why you encountered a fix task. Based on your helpful feedback, we corrected the article and will share the solution here with you: The fix task is due to the formula using both "single straight quotes" and "single smart quotes". For compatibility, it is recommended to only use single straight quotes. For example, here is the formula you used, and the new updated formula:
- Old formula:
result = fields['professor-name'].indexOf(‘Sanchez’)
- New formula:
result = fields['professor-name'].indexOf('Sanchez')
It is easy to miss, but the old formula used single smart quotes for Sanchez,
(‘Sanchez’)
. The new formula uses single straight quotes for Sanchez,('Sanchez')
. Updating your formula to use only single straight quotes should fix the problem. Feel free to copy and paste the new formula straight into your action—it should work as intended now.5 - Old formula:
Answers
-
Thank you very much! It works!
0