Hi,
I got a Problem with my ConfiForms.
I have two forms, Form 1 and Form 2. Form 1 uses Form 2 as a Smart Multi Row. When I delete an entry in the Multi Row using the edit controls in the table view, the connection is broken, but the original entry in Form 2 remains. This creates a lot of data clutter, so I want the entry in Form 2 to also be deleted when an entry is deleted from the Multi Row. Does anyone have an idea how I can achieve this?
Hi @Levin Hepp
Small demo video of how I would probably approach this (one of the methods)...
Configuration for the reference
<ac:structured-macro ac:name="confiform" ac:schema-version="1" ac:macro-id="ecf38f9a-55e7-4312-a7ef-08b17219f276"><ac:parameter ac:name="formName">Form2</ac:parameter><ac:rich-text-body><p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="43de7238-038f-4eb2-ad7e-c9fc9e1ffa8b"><ac:parameter ac:name="fieldName">name</ac:parameter><ac:parameter ac:name="fieldLabel">name</ac:parameter><ac:parameter ac:name="type">text</ac:parameter></ac:structured-macro></p><p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="d73f49d1-fd23-4024-95bd-2008687a50f3"><ac:parameter ac:name="fieldName">linkToForm1</ac:parameter><ac:parameter ac:name="fieldLabel">linkToForm1</ac:parameter><ac:parameter ac:name="values">[[entry._page]|Form1|id|true||]</ac:parameter><ac:parameter ac:name="type">smartselect</ac:parameter></ac:structured-macro></p><p><br /></p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="confiform" ac:schema-version="1" ac:macro-id="7a512624-8bbd-47fa-8400-971a79dc994c"><ac:parameter ac:name="formName">Form1</ac:parameter><ac:parameter ac:name="debugMode">true</ac:parameter><ac:rich-text-body><p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="79bb5da7-78e2-4999-b455-554d006833bc"><ac:parameter ac:name="fieldName">name</ac:parameter><ac:parameter ac:name="fieldLabel">name</ac:parameter><ac:parameter ac:name="type">text</ac:parameter></ac:structured-macro></p><p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="1c458de0-a987-4c01-b839-791dcf0ff69c"><ac:parameter ac:name="fieldName">multirow</ac:parameter><ac:parameter ac:name="fieldLabel">multirow</ac:parameter><ac:parameter ac:name="values">[@self:Form2]name,</ac:parameter><ac:parameter ac:name="type">smartmultirow</ac:parameter></ac:structured-macro></p><ac:structured-macro ac:name="confiform-ifttt" ac:schema-version="1" ac:macro-id="b1b8f500-d5bb-482f-af82-87e14edb4909"><ac:parameter ac:name="action">Synchronize smart field references</ac:parameter><ac:parameter ac:name="extras">linkToForm1</ac:parameter><ac:parameter ac:name="event">onCreated</ac:parameter><ac:parameter ac:name="title">multirow</ac:parameter><ac:parameter ac:name="who">Form2:@self</ac:parameter><ac:rich-text-body><p>synchronizes multirow with linkToForm1 field</p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="confiform-ifttt" ac:schema-version="1" ac:macro-id="5803f449-2033-4ac7-9e1f-47ed0dcbbffb"><ac:parameter ac:name="action">Synchronize smart field references</ac:parameter><ac:parameter ac:name="extras">linkToForm1</ac:parameter><ac:parameter ac:name="event">onModified</ac:parameter><ac:parameter ac:name="title">multirow</ac:parameter><ac:parameter ac:name="who">Form2:@self</ac:parameter><ac:rich-text-body><p>synchronizes multirow with linkToForm1 field</p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="confiform-ifttt" ac:schema-version="1" ac:macro-id="3ac828ba-34bc-4c00-a005-fa2499031cc9"><ac:parameter ac:name="action">Delete ConfiForms Entry</ac:parameter><ac:parameter ac:name="event">onModified</ac:parameter><ac:parameter ac:name="title">linkToForm1:[empty]</ac:parameter><ac:parameter ac:name="who">Form2:@self</ac:parameter><ac:rich-text-body><p>deletes records that dont have a reference to Form1 in linkToForm1 field</p></ac:rich-text-body></ac:structured-macro><p><br /></p><ac:structured-macro ac:name="confiform-entry-register" ac:schema-version="1" ac:macro-id="2f05db27-5274-49f4-8b03-8e0851c68278"><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><br /></p><ac:structured-macro ac:name="confiform-table" ac:schema-version="1" ac:macro-id="ab0e310d-1008-4d64-8b92-8e452da9dab3"><ac:parameter ac:name="formName">Form1</ac:parameter><ac:rich-text-body><ac:structured-macro ac:name="confiform-entry-edit" ac:schema-version="1" ac:macro-id="980a07ba-44a8-48d3-8a1c-324e8a2d6d15"><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><br /></p>
Alex
Thank you for your reply. It seems to work in principle, however, I now have the problem that when I edit an entry and, for example, change the name, the field linkToForm1 is set to empty and then the entry is deleted according to the rule.
Best Regards!
Levin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
linkToForm1 only resets when there is no link to another form (with the "synchronize IFTTT")
It does not reset when you just edit the "name"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't understand what the problem is; as soon as I edit, there are two scenarios: if the link has a value, it is "deleted" and it no longer has a value; if there is no value, a value is inserted.
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.