Forums

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

Confiforms: updating values original multi-row fields when copying a record

Bartosz Drożdżal
Contributor
January 22, 2024

Hi @Alex Medved _ConfiForms_ 

we updated Confifroms to version 3.7.7.

Now we have a problem with multi-row fields when copying a record.
Unfortunately, the values ​​from the multi-row fields update in the original record.

How can we fix or work around this?

2 answers

1 accepted

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
January 22, 2024

Hi @Bartosz Drożdżal 

When you copy a record and it has references to other records in the form of smart fields then you get this reference copied. Meaning that you link your new records to the same records

But for smart multi-row fields there will be a copy created for each row that is referenced through that field. 

Simple test (you will need to change the smart multi-row field configuration to be linked to the "sources" form on your page)

<ac:structured-macro ac:macro-id="dbb21d60-894d-4124-abf8-f983d4adb45f" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">sources</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="eb4b69ff-7d4f-4ac5-9cd2-66f795cbf4ac" 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="1dd0ecaf-a32c-4c4f-ba13-c66651145e9b" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">t</ac:parameter>
<ac:parameter ac:name="fieldLabel">t</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="9f130e87-6aac-4418-a40f-cdf7e3b314be" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ta</ac:parameter>
<ac:parameter ac:name="fieldLabel">ta</ac:parameter>
<ac:parameter ac:name="type">textarea</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>Rows in sources</p>
<ac:structured-macro ac:macro-id="c31a7cde-ba69-4d32-a7c3-37bf2bc1fb9d" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">sources</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="ca4ba5a4-c627-4705-b045-be715f5e32b3" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">id</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="49267df7-3fe5-4411-a98e-9dfced1ab87b" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">t</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="5deb1a82-68aa-4fca-b007-32144f28f52f" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">ta</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="c4b771fd-5b00-4626-90ee-3a2209ae5840" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="c97c3192-3a58-4e6e-8134-b0950db5a110" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">justfield</ac:parameter>
<ac:parameter ac:name="fieldLabel">justfield</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="6eb6b290-51fc-406f-aa52-c9acaa8b854a" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">smartRow</ac:parameter>
<ac:parameter ac:name="fieldLabel">Smat row</ac:parameter>
<ac:parameter ac:name="values">[171835522:sources]t,ta,</ac:parameter>
<ac:parameter ac:name="type">smartmultirow</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="6aeb51be-469c-4471-9dd3-218ec381a6d9" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<p>Rows in a form</p>
<ac:structured-macro ac:macro-id="2ea0f7b5-8831-42f1-b5eb-9d76b9560261" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="messageToShowWhenEmpty">Nothing here so far</ac:parameter>
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="441aaa37-bc20-4f97-bf61-c2f277037d14" ac:name="confiform-entry-edit" ac:schema-version="1">
<ac:parameter ac:name="showCopy">true</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>
<br/>
</p>

Alex

Bartosz Drożdżal
Contributor
January 22, 2024

@Alex Medved _ConfiForms_ 

Step 1:
I create the first record with values:
cis (multi-row) - 11111
client name (multi-row) - Client 1
segment (multi-row) - 5
currency (multi-row) - 2000.00
invoice number - 2000/TEST

Step 2:
I copy the first record and changed the field values:
cis (multi-row) - 22222
client name (multi-row) - Client 2
segment (multi-row) - 6
currency (multi-row) - 3000.00
invoice number - 3000/TEST

Step 3:
Unfortunately, when copying the first record, the data from the multi-row field in the original record was updated. It is my problem.

 

multirow.jpg

Alex Medved _ConfiForms_
Community Champion
January 22, 2024

Hard to tell, could you share the complete configuration that you have or could you confirm the one that I have provided fails to work for you?

Bartosz Drożdżal
Contributor
January 22, 2024

@Alex Medved _ConfiForms_ 

Sorry but i cant share complete configuration.
Your setup doesn't work.
The copy and multi-row fields operation worked fine on the earlier version we had - 3.4.3. After updating to 3.7.7, it stopped working properly.

Will the screenshot below be ok for you?
multirow1.jpg

Alex Medved _ConfiForms_
Community Champion
January 22, 2024

The setup I have shared works for me, consider updating ConfiForms

Alex

Bartosz Drożdżal
Contributor
January 23, 2024

Update to the latest version helped, now everything is fine.

Thanks!

0 votes
Bartosz Drożdżal
Contributor
January 22, 2024

-

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events