Good morning all,
Despite a lot of reading and trying, I can't automatically update the child table when I modify the parent table.
In my example, I created a parent row, then I created multiple children rows.
So far, everything is working fine.
I sometimes need to correct or change, for example the location or the phone number in the parent file and I want this to automatically update in the children file (without having to open each children line)
I tried to go through
ACTION and Data: Set execute an action on a set of rows, Referenced Action: Edit but it doesn't work😓.
Can anyone help me🙏?
Solved! Go to Solution.
Saut Renaud,
Pardon j'ai oublié une étape intermédiaire. Les voilà de nouveau:
Create New Action and name it Update_Child
For a record of this table: Children
Data: Set values of some columns in this row
Set these columns:
NAME = [ID PARENT].[NAME]
SURNAME = [ID PARENT].[SURNAME]
LOCATION = [ID PARENT].[LOCATION ]
PHONE NUMBER = [ID PARENT].[PHONE NUMBER]
Create New Action and name it Select_Children
For a record of this table: Parent
Data: execute an action on a set of rows
Referenced Table: Children
Referenced Rows: [Related Children]
Referenced Action: Update_Child
In your Parent_Form view, set Event Actions: Form Saved = Select_Children
But i agree with @TeeSee1 , It is not a good practice to have redundant data.
You don't need NAME, SURNAME, LOCATION , PHONE NUMBER in your Children records since you have them already in your Parent Table.
Bonjour Joseph,
Merci pour votre réponse, deux problèmes que je rencontre
1 : Lorsque j'ai créé ACTION REFRESH, je n'arrive pas à récupérer la colonne REFRESH qui est dans CHILD lorsque j'utilise la table PARENT.
2 : Je n'arrive pas à récupérer une action que j'ai créée dans la vue Formulaire parent
Quelles sont mes erreurs ?
Ci-joint un exemple d'application avec les tests
Lien du navigateur
https://www.appsheet.com/start/064284bb-ab85-442b-948c-27c2bb5b59fb
Cordialement
Renaud
Show us exactly what you did.
More importantly, why do you even need these for fields in the child's records? You have a col that ref the parent row and whenever you need information from the associated parent record, all you have to do is de-reference it.
It is not a good practice to repeatedly/redundantly store data.
Saut Renaud,
Pardon j'ai oublié une étape intermédiaire. Les voilà de nouveau:
Hello Joseph
It also works very well, thank you for your time..👌
Renaud
Create New Action and name it Update_Child
For a record of this table: Children
Data: Set values of some columns in this row
Set these columns:
NAME = [ID PARENT].[NAME]
SURNAME = [ID PARENT].[SURNAME]
LOCATION = [ID PARENT].[LOCATION ]
PHONE NUMBER = [ID PARENT].[PHONE NUMBER]
Create New Action and name it Select_Children
For a record of this table: Parent
Data: execute an action on a set of rows
Referenced Table: Children
Referenced Rows: [Related Children]
Referenced Action: Update_Child
In your Parent_Form view, set Event Actions: Form Saved = Select_Children
But i agree with @TeeSee1 , It is not a good practice to have redundant data.
You don't need NAME, SURNAME, LOCATION , PHONE NUMBER in your Children records since you have them already in your Parent Table.
Hello Jervz,
Thank you for your solution, it works perfectly!!!🙏
I am concsient, and I thank TeeSee for reminding me that there should be no redundancy between tables.
The application is in development, it is for the generation of document in word mailing that I need it for the moment. When I generate directly from the application, I can delete these duplicates.
Thank you all
User | Count |
---|---|
44 | |
34 | |
24 | |
23 | |
15 |