Dependence of several form entries on a entry in another form, automatic update

By: Dmitry Vodovatov | Asked: 03/03/2023
ForumsCategory: General questionsDependence of several form entries on a entry in another form, automatic update
Dmitry Vodovatov asked 2 years ago

Hi, community! Form A 'Projects' (contain Name and Status field) and Form B 'Related Project Tasks'. Form B contain dropdown dynamic (or lookup) field with Form A Name, and automatically populate Status field from Form A. When the Status in Form A changes, it changes in all entries in form B in which Form A Name and Status was selected in the field Example,

  1. I create two entries in Form A
    1. Name = Project 01, Status = New
    2. Name = Project 02, Status = New
  2. I create two entries in Form B
    1. Name = Task 1, Project = Project 01 (Lookup Name field from Form A), Status - New (Lookup Status field from Form A with Name field watch)
    2. Name = Task 2, Project = Project 01 (Lookup Name field from Form A), Status - New (Lookup Status field from Form A with Name field watch)
    3. Name = Task 3, Project = Project 02 (Lookup Name field from Form A), Status - New (Lookup Status field from Form A with Name field watch)
  3. I change entry Project 01 in Form A, new Status = In progress
  4. Field Status in Task 1 and Task 2 updated automatically (= In progress)

The problem is that the Lookup field (Name and Status) in Form B is not automatically updated

I drew a diagram - 3 stages of the form actions and relations.

Any idea?

Attachments
Walter JonesWalter Jones replied 2 years ago

What’s your question?

Dmitry Vodovatov replied 2 years ago

Hi, Walter. How automatically sync Project 01 status in Form B (Task 1 and Task 2) if Project 01 Status in Form A has been changed? But do not change Task 3, because it is associated with the Project 02 across the lookup field

Victor Font replied 2 years ago

What kind of lookup field did you choose to use? Are you aware that there are two types, Dynamic vs. Lookup?

From what you describe, it sounds like you should be using Dynamic. It's important to know the difference between the two. If you use Dynamic and the value changes in the lookup, it changes everywhere that value has been selected because a Dynamic field is a link to the lookup record just as there world be in a relational database design. Lookup fields only store textual content, not a link relationship. See this: https://formidableforms.com/knowledgebase/dynamic-vs-lookup-fields/

Dmitry Vodovatov replied 2 years ago

<p>Victor, the problem is that I need to synchronize the Status field in Form B based on what is selected in the Name field. If Plan 1 is selected in Form B entry, the Status set as in Form A Plan 1 entry. Synchronizing the Name dynamic field works great, but how do I synchronize my Status at the same time (and automatically)? Take a look at the diagram I drew. There are three stages of status change. I did not see such synchronization in Formidable knowledge databases and Formidable Masterminds site</p><p>In fact - I need to synchronize dynamically 2 fields, not one</p>

1 Answers
Bobby Clapp answered 2 years ago

The only way this happens in my mind is with the frm_after_udpate_entry hook: https://formidableforms.com/knowledgebase/frm_after_update_entry/#kb-automatically-update-a-field-in-another-form

Dmitry Vodovatov replied 2 years ago

Hi, Bobby! Thank you very much for the response!
I know this hook. Unfortunately, my issue is to start a bulk action with entries of FORM B after editing one entry of FORM A. There are form "Plan" and form "Tasks". When you create an entries in Form "Task", you select the Plan (in dropdown field) to which it belongs. After you delete the Plan entry, all associated Tasks are deleted as well.

Bobby Clapp replied 2 years ago

I don't have more to offer. Thanks for reading my response.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right