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

test for IsEmpty on multiple fields at portal row exit


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

Recommended Posts

Posted

I have a portal in which all fields are required.

My script so far:

If [isEmpty (table::StaffID)]

Show Custom Dialog ["Validation Failure!! StaffID must have a value"]

Go to Field [table::StaffID]

Halt Script

End If

I have two problems to solve.

1) I want to invoke this script them someone tries to exit the portal row--all I can come up with is to apply a trigger to the last field, and have it implement on save or exit. What if the enduser skips the last field? (which they aren't suppose to do). Is there another way to do this.

2) There are a total of 4 fields in the portal and all four should be required. How do I modify the script to ensure that all four fields will require data?

Posted

1) You can use onObjectExit by right clicking the portal in Layout mode and selecting "Set Script Triggers" and that would trigger the script if the user tried to leave the portal or go to another row in the portal. Or you could set the trigger on each field exit (but then you'd have to have separate validation scripts for each field).

2) If you use onObjectExit for the portal, nest your validation script. ie:


If [isEmpty (table::StaffID)]

Show Custom Dialog ["Validation Failure!! StaffID must have a value"]

Go to Field [table::StaffID]

Halt Script

Else If [isEmpty (table::StaffFirstName)]

Show Custom Dialog ["Validation Failure!! StaffFirstName must have a value"]

Go to Field [table::StaffFirstName]

Halt Script

Else If [isEmpty (table::StaffLastName)]

Show Custom Dialog ["Validation Failure!! StaffLastName must have a value"]

Go to Field [table::StaffLastName]

Halt Script

Else If [isEmpty (table::StaffsWifesPhoneNumber)]

Show Custom Dialog ["Validation Failure!! StaffsWifesPhoneNumber must have a value"]

Go to Field [table::StaffsWifesPhoneNumber]

Halt Script

End If

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