crazybake Posted November 17, 2002 Posted November 17, 2002 How do I setup a Popup menu that will have 3 weeks of selectable dates. I understand how to list them individually, I just can't get them to list in a popup menu together..
jasonwood Posted November 17, 2002 Posted November 17, 2002 Never done this but here's a thought... Do you want this list to always show the "next" 21 dates starting with the present date? You might be able to do this... Set up a global field, "globalNext21Days" Now set up a script "setNext21Days" that will populate this field every time you start up the db. Script: Set field, globalNext21Days = Today &
crazybake Posted November 18, 2002 Author Posted November 18, 2002 The problem I have with this option is that you cannot index this global field... thus no popup. I even tried to use Date to text but this also did not work... help?...
CobaltSky Posted November 18, 2002 Posted November 18, 2002 Hello crazybake, Your question is not very explicit. A string of dates can be entered as text into a hard-coded value list, and from there will be available for selection. I am guessing, however, that you want to achieve dynamic list functionality where the dates presented on a pop-up list are referenced to the current date or some other value in the current record? If that is the case, then an approach you might like to consider is: 1. Create a calculating number field (stored and indexed) called 'RecordID' with the formula Status(CurrentRecordID). 2. Create a self-join relationship called 'CurrentRecord' which matches the RecordID field to itself. 3. Create a new text field called 'DateList'. 4. Define a value list called 'DynamicDates' which uses values from the field 'DateList', select the "Use only related values" option, and specify the CurrentRecord relationship. 5. Place the field that you want the value list to operate on on your layout (for the purposes of this example, I'll refer to this field as 'YourDateField'), define it as a pop-up list to use values from the 'DynamicDates' list, and then go into 'Field Format' and turn off the 'Allow entry into field' option. 6. Create a script called 'DateListUpdate' which runs along the lines of: 1[color:"white"]..... Set Field ["DateList", "DateToText(Status(CurrentDate)) & "
crazybake Posted November 19, 2002 Author Posted November 19, 2002 That option worked great.... But, I noticed that you have to click the script button with each record to select. Will this be affected if I run the script as each record is viewed?
CobaltSky Posted November 19, 2002 Posted November 19, 2002 The intention is that it is the field itself to which the script is attached - and therefore clicking on it to enter it is not dissimilar to the normal action of clicking into a field. However if you wish to set the script to run as a sub-script of a navigation script which moves you between records, then as well as manual operation, the list will be opened (with refreshed date values) whenever you move to a new record.
Recommended Posts
This topic is 8044 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 accountSign in
Already have an account? Sign in here.
Sign In Now