Can Browse Mode Behavior of a Field object be changed with scripting, if it can what are the script step?
You can set Conditional Formatting and On Object Hide depending on data that you can have in fields that affect your fields in Browse mode
You can cause actions when a user interacts with a field via script triggers.
You can manipulate the data in the field with calculations.
As Johan said you can change the presentation aspects of the UI objects with conditional formatting and you can show/hide the UI control with the Inspector.
What do you want to do?
I want to set the Field Entry Behavior to "Browse Mode" if a condition is met and reset the Behavior at the end of the script.
One way to do it is to assign the field as a button, with a script like:
If[ condition ]
Go to field[ theField ]
That is a feature request that has been made for many years now. Unfortunately we still do not have it.
The way around it is to put two copies of the field on the layout, stacked directly one on top of the other, one with browse enabled and the other one disabled. Using the Hide When option set the particular criteria (XXX) you want to determine which field is visible, and set the other field to be the opposite condition (i.e. not (XXX))
Please try to be a little more precise in terminology.
In FileMaker "Browse Mode" is a specific term for Window Mode ( Find, Layout, Preview, and Browse modes of the window)
So using it to describe UI control behavior is a bit ambiguous.
Do you want the field editable when your test condition passes?
What do you want to happen when your test fails?
Thanks for the input
All of the terminology used in my initial question is from the Inspector window;
These are the manual steps taken to set or reset the Behavior of a selected object. My understanding of script development is to first understand the manual steps.
If there is a more precise way to ask the question as to prevent Ambiguity please let me know.
What is your objective in changing this setting? If you're running a script, you can use Set Field without needing the field to be accessible in Browse mode.
The Script I want to create is not to Set Field with data, it is to change the Behavior of the Field. You can only view the data in the Field or you can edit the Field.
The Field in question "Availability" is on a Layout and it displays the status of the record being viewed. I want to give certain users the ability to change the status (Hold, Sold, Available), then reset the "Availability" field so it can no longer be edited.
This can't be done with privilege sets?
Another approach (seen in the starter solutions) is similar to what flukey recommended. Use a popover that contains an editable version of the field, and leave the non-editable version on the layout. Use Hide Object to show or hide the popover, based on other conditions you specify. (The advantage of the popover is it translates well into WebDirect, where layering objects does not.)
Here's another technique provided by Chris Wilson via Facebook:
1) Set the field to disallow entry in Browse mode.
2) Give the field an object name.
3) Use a simple script:
Go to Object [ objectName ]
Go to Field [ yourField ]
Demo file attached.
Field Entry in browse mode is the UI control property you want to address.
Their are a bunch of ways to restrict field entry in browse mode.
Layered controls, privilege set/security settings, calculations, etc.
I'm a fan of using the security settings first as this is a data integrity issue.
Try the ones that have already been suggested and if they dont work for you let us know exactly why and we can suggest other methods
Retrieving data ...