Hi there. Servoy newbie here, so forgive me if this is blindingly obvious or has been covered before (I searched the forum, honest).
One of my favorite tricks in FMP is to set up a relationship with multiple critera, set to allow automatic creation of records. I can use this relation to easily create (or update) a lot of child records for a found set, using a simple looping set-field script. Set a field via the relation, and, boom!, the child’s created and automatically populated. The nice thing is if the child already exists, the set field command simply updates the appropriate field in the child.
So, in getting my feet wet with Servoy, I’ve tried to do something similar, and, not surprisingly, I haven’t gotten very far.
If I put the related fields on a layout linked to the parent table, I can manually click in a field, enter some data, and when I click out of the field, the related record gets created, with fields populated much as in FMP.
My attempts to write a method to do this haven’t worked. I loop through a found set, and use form.related_table.field = newValue.
And nothing happens.
So either I’m doing something wrong which should be blindingly obvious, or it just doesn’t work this way.
Can someone help me?
Eric Taub