Keeping two ConfiForms in sync
Asked by Jeff Weisman:

We have two forms that need to update one another and stay in sync. For simplicity sake lets use this mock-example. A librarian has a form (form 1) that they use to update information on the library to include the books that the library has available.

**Form 1 - Libraries**   
Field 1 - Library Name - Text Field  
Field 2 - Library Description - Text Field  
Field 3 - Books Available - Smart Multi-Checkbox Field (Source Form - Books)

**Form 2 - Books**   
Field 1 - Book Name - Text Field  
Field 2 - Book Description - Text Field  
Field 3 - Libraries - Smart Multi-Select Field (Source Form Libraries)

When a librarian is updating their library's record in the Library form they need to select all of the books that the library has available, and remove any selections that it no longer has available. They do this using the smart multi-checkbox field in the library form registration/edit.

When the librarian saves that form we also need to pass the library name to the Books form for each book record, or remove it if the librarian has unselected the book. The books form/views is used to see what libraries a book is available in, and has many downstream views and filters separate from the library form.

What macros/functions do we need to use to maintain this sync between the two forms? We also have a similar use case with a smart multi-row field. But we're assuming the solution for the above will tackle this.

![Confiforms view.png](https://community.atlassian.com/t5/image/serverpage/image-id/320031i1004B44BE2251EF1/image-size/large?v=v2&px=999 "Confiforms view.png")

![Confiforms config.png](https://community.atlassian.com/t5/image/serverpage/image-id/320043i8F3B6EA294D73E07/image-size/large?v=v2&px=999 "Confiforms config.png")

ConfiForms (version: **3.10.3**). License type: Commercial license.


Answers:
author: Alex Medved _ConfiForms_
body: So, you essentially want to have 2 forms that keep information about records in other form and those should be in sync...

Why would you do that? Have you considered a simpler solution with just one form holding the data and in the second form you can then do a something with a "queryAndRender" [function](https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions) (basically looking up the current data related to one or another record)

comments: author: Ryan A_
body: Could you please explain this further or give a code example? I also can't get this to work and have the same problem as OP and people are manually inputting the values across both forms. [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630)


author: Alex Medved _ConfiForms_
body: We have prepared an [example here](https://wiki.vertuna.com/pages/viewpage.action?pageId=180945550)

Please note that this will require to update ConfiForms to at least version 3.11 on DC (or use the cloud version, which is updated for you automatically)


author: Jeff Weisman
body: [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) the Atassian site wouldn't let me respond to your comment in other other post ([Solved: ConfiForm delete entries in nested forms (atlassian.com)](https://community.atlassian.com/t5/Confluence-questions/ConfiForm-delete-entries-in-nested-forms/qaq-p/2565445)) so replying here.

Thank you so much for your help! After speaking with the team, the problem we're facing is slightly more complex than I realized. Any recommendations for how to handle this?

comments: author: Alex Medved _ConfiForms_
body: Yes, while this can be solved with lots of updates from one form to another we have decided to make things easier and introduced a new ConfiForms IFTTT action that is a lot easier to configure and use and which does exactly what you are looking for

[An example on how to use it could be found on our wiki](https://wiki.vertuna.com/pages/viewpage.action?pageId=180945550)

Hope it helps and also simplifies things for you while providing the results you want


author: Erik Riedel
body: Hello [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) ,

Nice that this IFTTT-Action is know available. I would like to ask you about a possible solution for an issue I observed:

I took your example from your wiki.

Whenever I update the form "Books" it overrides all other selections in the form "Libraries". I tried to adapt the action for a simple Skill Management database.

So I would like to define roles and map skills to that Roles. When a new skill is added to the form and the entries for the selected roles are given only the value of the newly created skill.

The synchronisation from Roles to Skills ("downwards") works fine and updating works as intended. But "upwards" (so updating a skill by the used roles) overrides the entries in Form "Roles". This leads to the problem that the databases stay not syncronised.

**State 1 - Within Roles I selected Skills**

![CF-State1.png](https://community.atlassian.com/t5/image/serverpage/image-id/339314i31B88A578DB89C8C/image-size/large?v=v2&px=999 "CF-State1.png")

**State 2 - Within "New Competence" I selected the roles**

I selected "Role 4 (New)" and "Role 3"

![CF-State 2.png](https://community.atlassian.com/t5/image/serverpage/image-id/339315i54E4B5E277719B39/image-size/large?v=v2&px=999 "CF-State 2.png")

![State 2 - Debug Info.png](https://community.atlassian.com/t5/image/serverpage/image-id/339316iF8A2283628CF1E6E/image-size/large?v=v2&px=999 "State 2 - Debug Info.png")

**ConfiForms (version: 3.11.2)**


Tags: confiforms

confluence-data-center

data-center