Forums

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

Confiforms: move attachment and record id update

Bartosz Drożdżal
Contributor
November 29, 2023

Hi @Alex Medved _ConfiForms_ 

I have problem with IFTTT move attachment and update attachemnt record id.

I use two IFTTT:

1) OnCreated - MoveAttachment 
    condition: f1_checkbox:true
    attachmentID: [entry.files.asAttachments.transform(id).asList]
    Page (id or title) to move the attachment to: 276736255

2) OnCreated - Create/Update Confiforms Entry
    condition: f1_checkbox:true
    Parameters to set on the entry: files=[entry.files]
    Reference to form and its location (pageId): FormName: 276736255

Everything is ok, but when I want to edit a new form on page 276736255 and delete the file, I get an error:
Could not delete this attachment: Record (holding an attachment) was not found.

What am I doing wrong?

 

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
November 29, 2023

Hi @Bartosz Drożdżal 

Attachments should be set as comma separated values I believe

files=[entry.files.asAttachments.transform(id).asList]

 Alex

Bartosz Drożdżal
Contributor
November 29, 2023

I change files=[entry.files] to files=[entry.files.asAttachments.transform(id).asList] but I still get an error :(

Alex Medved _ConfiForms_
Community Champion
November 30, 2023

Little demo http://recordit.co/LDKDx3eSb1

And the storage format for the reference

<ac:structured-macro ac:macro-id="317f9b0f-e770-4245-bca1-1797e880ca78" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">form1</ac:parameter>
<ac:parameter ac:name="debugMode">true</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="fbd93083-b77a-4f8e-8d2f-e5a39208e752" 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="641967af-3ba9-49f2-98ec-6c237f6c6227" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">move</ac:parameter>
<ac:parameter ac:name="fieldLabel">move files?</ac:parameter>
<ac:parameter ac:name="type">checkbox</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="47ae1bab-612d-4763-8bcd-42f37cd32314" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">files</ac:parameter>
<ac:parameter ac:name="fieldLabel">Files</ac:parameter>
<ac:parameter ac:name="type">file</ac:parameter>
</ac:structured-macro>
</p>
<ac:structured-macro ac:macro-id="099e969f-042e-4851-9201-1ef9994bcfa3" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="condition">move:true</ac:parameter>
<ac:parameter ac:name="action">Move Attachment</ac:parameter>
<ac:parameter ac:name="extras">166690966</ac:parameter>
<ac:parameter ac:name="event">onCreated</ac:parameter>
<ac:parameter ac:name="title">[entry.files.asAttachments.transform(id).asList]</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="27729fd4-a1e7-4fd2-8292-9a5ead92eb9f" ac:name="confiform-ifttt" ac:schema-version="1">
<ac:parameter ac:name="condition">move: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">files=[entry.files.asAttachments.transform(id).asList]</ac:parameter>
<ac:parameter ac:name="who">form2:166690966</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="9a720be9-1073-41c9-9922-330fd7cedcbd" ac:name="attachments" ac:schema-version="1"/>
</p>

The form on the target page has only one field of type File/attachment with the same name as on form 1 - "files"

 

Hope it helps

Alex

Bartosz Drożdżal
Contributor
November 30, 2023

Your solution works, but I mean something else.
I want copy my content when i'm on new page 276736255.
When I open the registration form and want to delete the transferred files, I receive an error.
I can open files but i cant delete.


Przechwytywanie.JPG

Alex Medved _ConfiForms_
Community Champion
November 30, 2023

I dont get it... you want to copy a record and you want to move attachments WHERE? to the same page? Makes no sense to me 

Bartosz Drożdżal
Contributor
November 30, 2023

I have my registration form on PAGE A.
When i create record i display my records on PAGE B.
I use move attachment to trasfer files form PAGE A to PAGE B.

Users want to be able to copy records on PAGE B (sometimes modifying or deleting/adding files when create new record).
When i want copy and delete files I receive an error.

Alex Medved _ConfiForms_
Community Champion
November 30, 2023

Do you have one form? And want to move attachments from the original record to a new, copied one and store attachments on a different page?

Do you want to copy or to move attachments? 

Bartosz Drożdżal
Contributor
November 30, 2023

I have one form and i want move attachments.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events