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

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

Recommended Posts

Posted

I have a script that imports some records from a file but if no records happen to be imported a message is shown saying - No records were found - and the script and sub scripts should stop and go to the main file to the menu layout.

I

Posted

Try this - create a separate script especially for when no records are found that takes you to the main layout and has a Halt Script step.

if Current found count=0

show message - No records found

Perform Script - Go to main layout NO RECORDS

end if

HTH, Mike

Posted

After I sent this request I continued trying and what I did was just what you said. I created a script with

If current found count = 0

show message

Perform script - go to main layout

exit script

end if

I put this script in the main script and everything worked fine.

Thanks.

Posted

Halt Script will indeed terminate all running scripts and subscripts. You should never get past this step in a script. If you do, then the portion containing the Halt Script is, in fact, not running. Exit Script will only skip the remaining steps in the currently active script. If used in a subscript, then control returns to the parent script and continues where it left off. A Halt, however, stops everything dead in its tracks.

Is your 'No Records Found' message showing? If it is, then your Halt should be working. If you pasted your code exactly as it is, it may help to determine what your issue is.

Posted

OK, lets see if this clears up what I was trying to explain before. You need a separate script that returns you to the Main Layout in your main file when your import has no records.

if Current found count=0

show message - No records found

Perform Script - Go to Main Layout No Records

end if

In your main file, have a script called Go to Main Layout No Records that only has two steps.

Refresh Window [bring to Front]

Halt Script

HTH, Mike

Posted

Sorry for taking so long to answer but I haven't been able to get in the forum's site. I don't know what's going on but sometimes this site is not found, maybe some changes are going on...

Well coming back to the script. It worked and the problem was that there was a script step that wasn't working and as I changed it everything worked perfect.

Thanks for all your help.

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