Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How would you write this script for value defs?

Featured Replies

I am working on a DB for employee tracking and I have a field called "Employee Status". I have a drop down of 5 items. 2 of wich are the words "Vacant" and "Contract".

If I select either of those two words, a second window pops up and asks for two date values that must be entered.

If I write a calculation for the "Employee Status" field and define as such. How should I modify my script to where it will bring up a second window that allows me to enter the Request Date and Expiration Date?

They can be both assigned the same because they both represent the same result if either is selected.

Let("Vacant" and "Contract" = 1),

If "Employee Status" = 1, Then open layout "Date menu"

Then the two dates would be entered, user would click OK, and close the window.

Simple, but what would be the best method to write this?

I'm not sure what calc you want exactly.

When a value is selected from list, a button or a plug-in would lauch a script.

If[value = "Vacant" or value = "Contract"]

New Window...

Loop

Pause[ unknown]

EndLoop

Then your Button, would be set to "Continue" (not sure of the US translation for this) and will close the window.

  • Author

I don't think you would want to loop it..

What would the loop serve as??

To lock the window, so that the user can't leave it unless the 2 fields has been filled or/and the button "OK" would be hit.

  • Author

That makes sense. Good point!

The calc would be as described to validate if "Contract" or "vacant" were selected from the drop down list, to show the second window with the 2 date fields for entry and an ok button to close the window.

Your script example above works but the only issue is how to trigger it after data entry has been performed? In the validation tab for the field, it doesn't give you the option to validate by script unfortunately. frown.gif

On Windows, you can define a field formatted as a menu as a button and run the appropriate function after a selection has been made. Remove the field from the Tab order so that users are forced to click on it. Use a script like

Allow User Abort [Off]

Go to Field [yourfield]

Pause/Resume script [1]

If [PatternCount( " vacant contract "; " " & Employee Status & " " )]

New Window

...

End If

  • Author

Gotcha! Pause the script for 1 second and bam...there it is....

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.