Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi. I have two fields on a layout. The first is the id field of a related table. It is a dropdown menu that shows a value list which uses the "Also display values from a second field" option so that it shows "name" values instead of the id itself. On top of that field is a second field. It is the "name" field of the related table (edit box, not dropdown). The top field allows entry in both Browse and Find Modes. I allow it in Browse Mode so that it can change color on hover (I didn't want to make it a button because I also need to enter data into it in Find Mode). The top field has a script trigger (onObjectEnter) that checks to see if the user is holding down a modifier key. If they are, it does a GTRR. If not, it just activates the first field (dropdown) using a Go To Object script step. Here's my trouble; if there is already data in the 2 fields, the onObjectEnter script is triggered correctly. However, if the fields are empty, it appears the script is NOT triggered (when I use Script Debugger, the script never starts up.) Any ideas?

 

Thanks very much,

Michael

Posted

Your description is not quite clear. I think your drop-down field is a local field - i.e. not "the id field of a related table" but a foreign key to the related table.

If this is true, then the reason you cannot enter the "top" field while the foreign key is empty is simply because there is no related record yet.

  • Like 1
Posted

Sorry about the inaccurate/unclear desciption. You're correct about it being a local foreign key.

 

Do you know if there is a way (without disabling entry of the top field in Browse Mode) to cause the lower field to activate when the fields are empty? I can do it via tabbing since the bottom field is in the tab order and the top field is not, but ideally I could trigger the dropdown when clicking on the blank top field.

 

Thank you!

Michael

Posted

I am not sure why you don't want to disable entry to the top field in Browse mode. If you do, you can click-through directly to the bottom field - and you can just as easily attach a script trigger to this field (or make it a button) as the other one.

 

You could also make the top field a button that goes to the top field or the bottom field, according to the current window mode.

Posted

I wanted the field to change color on hover, which meant either making it a button or allowing entry in Browse Mode. I didn't realize a button could be enterable by using a script that goes to itself, but that solves everything! Thanks very much!

 

Michael

Posted

I didn't want to make it a button because I also need to enter data into it in Find Mode). 

 

Just for future, you can allow field entry in Find but not Browse by controlling the checkboxes (Inspector > Data Tab > Field Entry.  :-)

This topic is 4040 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.