AnsweredAssumed Answered

Auto Enter fiels value based on other field value

Question asked by Socio.t on Jun 25, 2009
Latest reply on Jun 29, 2009 by philmodjunk


Auto Enter fiels value based on other field value


Hello everyone,


I'm new on FM, been working with it for a week now. I have here what I think is a slightly complicated case!


I have a set of related tables to register my company projects. In the projects table I want to insert the project information as well as the client information tha are related to that projects.


The function that I'm looking for at the moment is one that as an example when I choose from a drop down list the client name, automatically gives me that client code in the respective field. And vice versa, in the case that I only know the client code, choose it from a drop down list and it gives me the client name in the respective field.


The Project table is related to the Client table through the Client Code.



ClientName: FileMaker

Should auto insert in the Client Code: 0012


and the other way around two.


I kind of managed to do this with a script trigger on object modify that if the ClientCode on Projects is equal to ClientCode on Clients then ClientName on Projects is equal to ClientName on Projects.


But it doesn't work both ways.

I was once able to get the Client Code from the Client Name but instead of getting "0012" I got "12".


And don't know why, CAN'T GET IT TO WORK BOTH SIDES.


Would really appreciate it if someone could help me with this problem.


Thanks a lot.


Best regards,