Jump to content

Two fields, a portal, and a relationship

This topic is 6629 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Currently I have a portal based on data entered into a global field (let say gMake).

When clicking on a row of the portal, there is a script that populates other global fields, (gModel, gYear, gColor).

However, the specs for the interface has changed now, and now I have to have two fields but only one portal. In other words, Now I need gMake and gMake_Replace. When the user puts in Ford into gMake, then clicks on the appropriate portal record with button, it will populate gModel, gYear, & gColor. Then the user should click into field gMake_Replace. New values should come up in the same portal, and when the user clicks on the portal row, the fields gModel_replace, gYear_replace, gColor_replace should be populated.

Now, I wanted to try and do some kind of Get(ActiveFieldName) to execute what the last field was, either gMake or gMake_replace, when the user clicks on the portal row and executes the script, but once the portal is clicked, that function is no longer valid.

So I figured I need to match on some kind of third field (gLastfieldEntered) that holds the name of the last field that was entered.

It would be nice to execute a script once exiting a field to set this third field, but I didnt think it was possible to execute a script when a field is exited. Is there a plug-in of some sorts? I am not sure what I can do or the correct fields to use for this problem.

P.S. I dont think this was necessarily a portal question, so if I posted it eh wrong forum, then I apologize ahead of time.

Link to comment
Share on other sites

Thanx Soren. I ended up finding the appropriate EventScript plugin and running a script to do it. Too bad I couldnt find it originally with the search that I ran. Maybe I just looked for the wrong keywords. I ended up finding out about it by just manually reading through past posts in the plugin section. That method works too. :-) Again thank you. I will look through the posted sample code in your post anyway out of curiousity.

Link to comment
Share on other sites

This topic is 6629 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.