August 25, 200223 yr I want a button that looks and behaves different in Find mode vs. Browse mode. The script was easy... if you click it in Find mode, it performs the find; if you click it in any other mode, it enters Find Mode. I want the label to be "FIND" in Find Mode, and "Found:" in other modes. So, I defined a field with the appropriate 'If' expression. I tried using a field object and I tried using a text object with <<>> notation. The problem is, when it goes into Find Mode, the text vanishes (like all fields). Argh! So, its working as I want, except in Find Mode it says nothing instead of "FIND". How do I tell it to display this field's value in Find Mode? Or is there some other simple way to get what I want?
August 25, 200223 yr Global fields don't disappear in Find Mode. Label your button with a global field and use Set Field () in scripting to control the label. -bd
August 26, 200223 yr If you want your button to change label/appearance when users enter find mode, regardless of whether they enter by script or not, there is a technique you can use that makes it automatic. Here's how to do it: 1. Create a global container field called 'gBrowseButton' and paste the button you want to appear in browse mode into it. 2. Create an unstored calculating field called 'BrowseButton.gui' of result type container with the formula set to gBrowseButton. 3. Position the button you want to appear in find mode directly on the layout, defined to 'Do Nothing', then place the field 'BrowseButton.gui' field over the top of it, appy transparent line and fill attributes and define it as a button to trigger your script (the one which acts differently for each mode). Now regardless of how users go about changing modes - with ctrl-f, ctrl-b or even from the tab next to the zoom buttons along the bottom of the window, the button will always change appearance.
August 26, 200223 yr Author Global fields don't disappear in Find Mode. Label your button with a global field and use Set Field () in scripting to control the label. This is a single-user technique, right? I mean, if multiple users were accessing this file, then when one person went into Find mode, everyone's buttons would change label, right? That wouldn't be too good. I don't suppose there is "gui fields" or "cookies" that are set for each user... that would make that work.
August 26, 200223 yr Global fields operate independently for each user, so the solution suggested is will work seamlessly in multi-user mode. Also, mode changes (and their effects on the display of data) are user-specific in all cases. In effect, global fields (so called because they are global to all records within the file in which they are located, not because they are global to users) do indeed operate a little like the "gui fields" or "cookies" you refer to. Along with this, it is important to understand that changes made to global field values by one user are seen by that user only - and only changes made to global values on the host machine (in multi-user mode) will be saved when the solution is closed.
August 26, 200223 yr This is a single-user technique, right? I mean, if multiple users were accessing this file, then when one person went into Find mode, everyone's buttons would change label, right? Absolutely not Dj
Create an account or sign in to comment