Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Confiforms: IFTTT onCreated, how to Update fields, specifically ownedBy field

In Confiforms, I'm using IFTTTs with 'Create/Update ConfiForms Entry' action to auto-populate some fields before saving.  One field I am auto-populating is the built-in ownedBy field.  

This works fine with the onModified event.  (Set parameters using 'entryId=[entry.id]&ownedBy=[entry.OwnersList]')

But this fails with the onCreated event.  (I.e. I am trying to set the ownedBy field as I create a new record.)

I think this is because one has to preface the list of fields to set with 'entryId=[entry.id]' ... but in the onCreated event, the record does not have an assigned Id yet.  So it would seem that one cannot set *any* fields with the onCreate event.

Is there a way to do this?

1 answer

1 accepted

ConfiForms record ALWAYS has id when processing IFTTTs, so I am really unsure what do you experience here

Please share an example that does not work for you... Also, what is "OwnersList" field type? 

Alex

Hmm ... never mind ... it's working now!

When I went to create an example, I couldn't make one that reproduced the problem.

But for the record, here's my Confiforms code. This was to give record-owners a way to add/delete other record owners ... by giving them an editable multiuser field, OwnersList, that I then copy to ownedBy using the IFTTT.  (As ownedBy otherwise seem to be only editable by form admins after creation.)

 

<ac:structured-macro ac:macro-id="66eda896-2ae2-4e74-87b2-9decef2d5b9f" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">FORM1</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="94ea73fa-e9be-4f1f-8a69-92b407b511d1" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">RecordName</ac:parameter>
<ac:parameter ac:name="fieldLabel">Record Name</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="d55c0f3c-15b8-4073-b7ca-51f8306c7e67" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">OwnersList</ac:parameter>
<ac:parameter ac:name="fieldLabel">Owners List</ac:parameter>
<ac:parameter ac:name="fieldDescription">Please list all people who you want to edit this record.</ac:parameter>
<ac:parameter ac:name="type">multiuser</ac:parameter>
<ac:parameter ac:name="separator">;</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="290e765f-fd60-4c2b-8549-61d78b6dd82a" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
<ac:parameter ac:name="event">onCreated</ac:parameter>
<ac:parameter ac:name="title">entryId=[entry.id]&amp;ownedBy=[entry.OwnersList]</ac:parameter>
<ac:rich-text-body>
<p>On Creation event, this copies the OwnersList field into the hidden ownedBy field. </p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="bd070467-53c7-4506-a705-ae5f4b62a7a9" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
<ac:parameter ac:name="event">onModified</ac:parameter>
<ac:parameter ac:name="title">entryId=[entry.id]&amp;ownedBy=[entry.OwnersList]</ac:parameter>
<ac:rich-text-body>
<p>On Modified event, this copies the OwnersList field into the hidden ownedBy field. </p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="a5ec70a0-4cf0-4fe2-89c7-52315a4ba32a" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="edaf1246-b088-4280-9676-13e79f341abc" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">FORM1</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="baa7965e-971f-4c93-b756-7a5d8743ac59" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">RecordName</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="0891656d-4623-43fb-8f5d-d8c1dcce7134" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">OwnersList</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="96cb7266-ce30-4eca-9f7a-afb9123a8381" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ownedBy</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>

I would tune this a bit...

<ac:structured-macro ac:macro-id="66eda896-2ae2-4e74-87b2-9decef2d5b9f" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">FORM1</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="94ea73fa-e9be-4f1f-8a69-92b407b511d1" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">RecordName</ac:parameter>
<ac:parameter ac:name="fieldLabel">Record Name</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="d55c0f3c-15b8-4073-b7ca-51f8306c7e67" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">OwnersList</ac:parameter>
<ac:parameter ac:name="fieldLabel">Owners List</ac:parameter>
<ac:parameter ac:name="fieldDescription">Please list all people who you want to edit this record.</ac:parameter>
<ac:parameter ac:name="type">multiuser</ac:parameter>
<ac:parameter ac:name="separator">;</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="b4e9cd56-9abc-4561-b305-0597759c8212" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="extras3">true</ac:parameter>
<ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
<ac:parameter ac:name="event">onCreated</ac:parameter>
<ac:parameter ac:name="title">entryId=[entry.id]&amp;ownedBy=[entry.OwnersList.asList]</ac:parameter>
<ac:rich-text-body>
<p>On Creation event, this copies the OwnersList field into the hidden ownedBy field.</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="d4fcfa31-4d87-4a0a-9314-e76c18346118" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="extras3">true</ac:parameter>
<ac:parameter ac:name="action">Create ConfiForms Entry</ac:parameter>
<ac:parameter ac:name="event">onModified</ac:parameter>
<ac:parameter ac:name="title">entryId=[entry.id]&amp;ownedBy=[entry.OwnersList.asList]</ac:parameter>
<ac:rich-text-body>
<p>On Modified event, this copies the OwnersList field into the hidden ownedBy field.</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="a5ec70a0-4cf0-4fe2-89c7-52315a4ba32a" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="edaf1246-b088-4280-9676-13e79f341abc" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">FORM1</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="baa7965e-971f-4c93-b756-7a5d8743ac59" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">RecordName</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="0891656d-4623-43fb-8f5d-d8c1dcce7134" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">OwnersList</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="96cb7266-ce30-4eca-9f7a-afb9123a8381" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ownedBy</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>

Making sure the ownedBy field gets always a correctly formatted list of usernames

ownedBy=[entry.OwnersList.asList]

And will make sure the IFTTTs that update the record dont fire the "Modify" events and dont trigger the "onModified" IFTTT handlers

Screenshot 2021-05-20 at 10.01.17.png

Alex

Thank you, Alex.  Two good tips!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Miss the Confluence demos at Team 21? Watch them here!

Phew, Atlassian Team 2021 blew by. With dozens of demos and a handful of keynotes, you may have missed some of the awesome Confluence Cloud sessions. Don't' worry, you can watch them all here or on Y...

136 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you