Quote:FormFieldValue will allow you to set an LE in the child form from the parent. In Gems:
FormFieldValue("Gems", "Origin", 1, "Canada")
will set the origin field to "Canada" on the Gems subform in the first instance of the subform.
I am not sure if this is a question a statement or just a lot of rambling but this topic brings many issues to a head. What ever this is it is as much a design question as it is a programming Sesame question. ???
Following FSGROUPS question, and figuring it is leading down the road a lot of us have discussed amongst ourselves the question equates to:
We have a form that contains client specific info. Say an element is called CUSNUMBER. Cusnumber is set by Sbasic logic using @number to set it to a unique number.
We want to have a child subform that is say invoices and we would like to have many invoices for this customer. If we use Natural links we can go to the subform enter data and press f10 for the next occurrence over and over again.
It seems like a nice clean and elegant method to track activity of that customer.
If we are not using Natural links we would need to have a key. Say the CUSNUMBER.
using the logic in your example FormFieldValue("mydatabase", "CUSNUMBER", 1, CUSNUMBER)
it will add the cusnumber to cusnumber element in the first instance of the subform I can probably use Sbasic to count the amount of child records and return that to the logic replacing the 1 with what ever number I am up to that needs the Cusnumber added. The problem here is we would have to create the child first then update with key information.
When I look at the final result I have a child record with a matching key. From old habits and the desire to be able to work with the data from separate databases outside of the whole application we feel it is necessary to have the key. But what would be the downside to using natural links letting Sesame do its internal record keeping and still adding my key just for data manipulation outside the application.
It would seem to me that if this database is used from scratch I would get the best of both worlds. If I import existing data I might have a problem with this theory.
So if there is no downside to using natural links and I still want a matching key would a good method be to after using Sesames Natural links to create the child have a command button that when pressed updates the Customer number element?
I hope this is somewhat clear as to my question and my intended use.
Thanks