Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Running Javascript from Confiform IFTTT

Chris Iacovelli
Contributor
June 2, 2023

I am trying to run a js snippet from an IFTTT in confiforms.

The triggering event is determining of the current status has changed. I know the status is changing (specifically intakeCurrentStatus.id as it is a drop down) as I can see the before and after states.run js on modified.png

I have tried dropping the windows. (hangs), i have tried just checking the status (hangs), i have tried checking the label (doesn't hang but no refresh - same behavior if I check the id), no luck.

Any suggestions?

2 answers

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
June 2, 2023

Hi

Just have it as a 

window.reload()

Full example (try updating value in a form and you will see page reload):

<ac:structured-macro ac:macro-id="17ee5937-a2c6-47da-a183-757db38f4ff5" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">f</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="fd7a73ba-3089-464e-a529-62741f0576cd" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="3f9bd56b-12af-4b26-afc5-26fe8e7235a3" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">status</ac:parameter>
<ac:parameter ac:name="fieldLabel">Status</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="44479a9b-c110-40a2-88f4-928f72040c10" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="condition">hasChanged(status):true</ac:parameter>
<ac:parameter ac:name="action">Run JavaScript</ac:parameter>
<ac:parameter ac:name="event">onModified</ac:parameter>
<ac:rich-text-body>
<p>location.reload()</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>

Alex

0 votes
go-like
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 4, 2023

<ac:structured-macro ac:macro-id="17ee5937-a2c6-47da-a183-757db38f4ff5" ac:name="confiform" ac:schema-version="1">

<ac:parameter ac:name="formName">f</ac:parameter>

<ac:rich-text-body>

<ac:structured-macro ac:macro-id="fd7a73ba-3089-464e-a529-62741f0576cd" ac:name="confiform-entry-register" ac:schema-version="1">

<ac:rich-text-body>

<p>

<br/>

</p>

</ac:rich-text-body>

</ac:structured-macro>

<p>

<ac:structured-macro ac:macro-id="3f9bd56b-12af-4b26-afc5-26fe8e7235a3" ac:name="confiform-field-definition" ac:schema-version="1">

<ac:parameter ac:name="fieldName">status</ac:parameter>

<ac:parameter ac:name="fieldLabel">Status</ac:parameter>

<ac:parameter ac:name="type">text</ac:parameter>

</ac:structured-macro>

</p>

<ac:structured-macro ac:macro-id="44479a9b-c110-40a2-88f4-928f72040c10" ac:name="confiform-ifttt" ac:schema-version="1">

<ac:parameter ac:name="condition">hasChanged(status):true</ac:parameter>

<ac:parameter ac:name="action">Run JavaScript</ac:parameter>

<ac:parameter ac:name="event">onModified</ac:parameter>

<ac:rich-text-body>

<p>location.reload()</p>

</ac:rich-text-body>

</ac:structured-macro>

<p>

<br/>

</p>

</ac:rich-text-body>

</ac:structured-macro>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events