Text function replace does not seem to work with smart values, e.g. {{page.get("content").replace("</tbody>","{{entry}}")}}.
Failed to get value for page.get("content").replace("</tbody>","{{entry: {{page.get("content").replace("</tbody>","{{entry}}")}}
What is the proper format to do this, if it is actually possible?
Actually, it seems that none of the text functions work with smart values, only literal ones. Is this just a known limitation?
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
Many of the rule functions will take smart values as parameters, although there are some exceptions based on context. (For example, some functions may not take smart value parameters once inside of a list iterator.)
What is the source of {{entry}} and what is its expected value? That may impact the replacement.
Until we know that...please try removing the quotation marks and nested curly brackets from the replacement text, including only the smart value:
{{page.get("content").replace("</tbody>",entry)}}
Kind regards,
Bill
I'm trying to replicate the same question but with a simple test where I've created different variables to replace the content of div (html)
Variables
baseContent = <div id="content"> <p>This is the original content</p> <!--PLACEHOLDER--> </div>
replaceContent = <p>NEW CONTENT</p>
It only runs correctly when placed directly with values set in the double quotes
combinedContent = {{baseContent.replace("PLACEHOLDER","W")}}
But when I want to pass the replaceContent variable it doesn't appear in any of the following tests
{{baseContent.replace("<!--PLACEHOLDER-->", replaceContent)}} -error
{{baseContent.replace("<!--PLACEHOLDER-->","${replaceContent}")}} -error
What is the correct way to pass smart values to a replace function?
It's Jira Automation Data Center
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just making a note that a separate Question was created by @Alexandra DM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Anthony Nguyen
Can you provide more information about the context of your issue?
If you are trying to use the in an Automation Rule please post images of the entire rule and the details of each step.
If the context is not an Automation Rule, what is the context?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.