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

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

Recommended Posts

Posted

Hi

 

I'm setting up my first FileMaker Pro 12 Advanced Database, so am still getting to grips with the layouts/scripts etc.

I have a project containing 18 screns to set up, and working through the forst of these, I have a question that is partially related to disabling entry to a control.

I have drop-down to allow the user to select a name, and then assigned to that control is an event which gets the email addrsss and office location for the selected person (using ExecuteSQL). As these fields are non-editable, I have simply set them as textbox entries and unticked both the Browse mode and Find Mode checkboxes in the Behaviour section of the Data tab of the Inspector.

post-109525-0-74630300-1380030471_thumb.

For another field, which access to is controlled in a similar way, that is a text field that is not populated by script. My question is - is it possible, in script, to check/uncheck the Bopwse Mode and Find Mode checkboxes?

 

One other quick question - is it possible to assign more than one script to a single event? Or do I create a script that calls the required scripts?

 

Thanks

 

Martin

Posted

Hi Martin,

 

For another field, which access to is controlled in a similar way, that is a text field that is not populated by script. My question is - is it possible, in script, to check/uncheck the Bopwse Mode and Find Mode checkboxes?

 

not sure I understand your process description; anyway, you cannot control those options programmatically. What you can do is write a script and use it as OnObjectEnter trigger for the field (in Browse and Find mode):

If [ not someCondition ]
  Commit Record 
End If

which effectively will disallow field entry. If you don't want to commit the record, create some dummy object and use Go to Object [ "myDummy" ] instead of Commit … 

Note that someCondition could be a field or a global variable with a Boolean value that you can set, and thus control field entry, on a dynamic basis.

 

One other quick question - is it possible to assign more than one script to a single event? Or do I create a script that calls the required scripts?

 

That's two questions … :ermm: No, and Yes  :smile:

Posted

Thanks.

 

I got around it with a script that checks the selected item of the field which controls the access, and if it's not one specific item, I simply use a script to set the value of the now invalid field to "" and then use Go To Field to skip to the next field when the now invalid field is tabbed into. So it works, but wanted to be sure I couldn't restrict entry cleaner (as it is with the fileds that have chose checkboxes unchecked).

 

OK, as I thought - thanks.

 

I have another question, but will start a new thread.

 

Thanks again

 

Martin

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