I've worked this very same problem. Your scripting has to capture the ID of the newly-created record and then set this FID field to that value.
1. Show Custom Dialog
2. Allow to enter a new Account manager
3. Create account manager in account manager table. (You're on the manager TO)
4. Capture that new record's ID.
5. go back to this company layout.
6. Put the value in this FID field.
Good evening Jeremy ,
Thanks for the reply.
We're on the right way, but in my situation there is no new-record-creation. All Account managers are already in the table Accountmanagers. It's a change of ownership. So step 3 needs to be something with "lookup", but Lookup is not a FM-term.
(I plan to be back at work tomorrow appx 09:00 Central European Time.)
I misunderstood. THat happens sometimes☺
So you're FID field has a dropdown, no?
You could easily set this drop down value list to include the IDs of the account managers from your account manager table. You can set it to store the ID from the account manager table, but show the name of the manager so the user knows who they are selecting.
Since you don't need to create any new managers, simply select from what's there. I'd get rid of the dialog box and simply allow the user to choose.
See my example here. I think I understand now what you're needing.
AccountMangers.fmp12.zip 67.4 K
Great! I'm very grateful for your effort! This does exactly the trick. I made modifications exactly according to your attached .zip and it is working well.
Theres no Conditional formatting to a pop-up I noiced, (each of the accounmanagers have their repective colour), but I solved that by putting a non-editable instance of the accountmanagers' name behind the pop-up menu, that does have conditional formatting.
Thanks once again,
Kind regards, Thomas.