December 4, 200322 yr 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
December 4, 200322 yr 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
December 4, 200322 yr Author 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.
December 4, 200322 yr 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.
December 10, 200322 yr 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
December 10, 200322 yr Author 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.
Create an account or sign in to comment