Jump to content

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

Recommended Posts

Posted

Since I can't figure out how to add an attachment, I'll try to explain what I need to do. I've got a script that takes the user from one layout to another if an account number is entered. The account number needs to be five numeric digits. I'm trying to put steps in the script that give a warning, prior to going to the next layout, that the correct entry wasn't make. Since there is a similar section on the first layout that requires the first couple of letters of a last name, I think it's important to let the user know he entered alpha characters where numbers should have been without discovering the fact after the script has sent him to the other layout and give him a chance to correct the mistake without going back and forth. The same would hold true if numbers were entered where alpha characters are required. This involved two separate scripts. Any help for this newbie would be appreciated.

Posted

Why are you allowing your script to proceed if the user has not entered the right values?

If [ length( filter(myField; "0123456789") ) = 5

Go to layout yourLayout

Else

don't

End if

You could also set the field to use an auto enter calc

Left( filter( self; "0123456789"); 5)

Posted

I don't want the script to proceed. I'm just not sure where to put the steps you suggest in the script. Here's what I've got without your suggestion:

Enter Browse Mode []

Show/Hide Status Area [Lock; Show]

Set Field [Field; Get (LayoutName )]

Go to Layout ["Layout Name" ]

Set Error Capture [On]

Enter Find Mode []

Set Field [Field]

Perform Find []

If [Get(LastError) = 401]

Show Custom Dialog ["No matching ......"]

Set Error Capture [Off]

Show All Records

Exit Script []

End If

Set Error Capture [Off]

Sort Records [Restore; No dialog]

Show Custom Dialog ["Choose Name"; Please hit ........"]

Halt Script

Posted

1. I suggest you learn how to use attachments. It is simple. You click the "Manage Files" link when you are editing your message.

2. Your script is not accurate. If you don't use an attachment, try printing your script to Preview; then copy the text and paste it into the message.

3. If you are trying to run a test (the IF statement) before going to a layout then you would put your IF statement before the go to layout statement.

Posted

The best way for us to see your problem is to submit a copy of your script / file.

To attach a file, see if this link helps Link. If you have any questions, let me know.

Lee

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