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

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

Recommended Posts

Posted

This makes no sense to me. I have a layout that features a pop up list of reports that I wish to run and a button that runs a script. The script queries the contents of the pop up list and performs a subscript based on this. The subscript then performs this code

Set Error Capture[On]

Perform Find[Restore]

Sort[Restore, No Dialog]

Go to Layout[Refresh window, "Layout1"]

This is the same piece of code in all the subscripts. The problem is that the new reports I added to the pop up list don't find anything, whereas in native Find Mode it works great. The subscripts work for all the other reports in the pop up list but not the new ones. What is the problem?

Thanks

The Mad Jammer

And then...there was nothing

Posted

Maybe the problem is not with the subscript, but what comes before it. Which is...what?

Posted

I know that I am getting to the subscript because I used a Show Message in the subscript and it showed up fine. But here is the script that runs when the Run Report button is pushed...

Run Report script

If ["fldReports = "USER1-OPEN""] then

Perform Script[sub-scripts, "Reports-USER1 Open"]

End If

If ["fldReports = "USER1-CLOSED""] then

Perform Script[sub-scripts, "Reports-USER1 Closed"]

End If

If ["fldReports = "USER1-ALL""] then

Perform Script[sub-scripts, "Reports-USER1 All"]

End If

If ["fldReports = "USER2-OPEN""] then

Perform Script[sub-scripts, "Reports-USER2 Open"]

End If

If ["fldReports = "USER2-CLOSED""] then

Perform Script[sub-scripts, "Reports-USER2 Closed"]

End If

If ["fldReports = "USER2-ALL""] then

Perform Script[sub-scripts, "Reports-USER2 All"]

End If

etc..

End of script

All of the subscripts look the same, as above. When I added, for example, USER5-OPEN, USER5-CLOSED and USER5-ALL to the fldReports value list, I made copies of the USER4 subscripts and renamed them to USER5 subscripts. Unfortunately, they dont find any USER5 records. They don't find anything. If I go into Find Mode in Layout1 and put USER5 criteria in the serach criteria I get all records for USER5.

The actual subscripts perform a find on both the USER name field and the status field.

BTW, Pink Floyd is one of my all time favorite bands. Your icon puts me in mind of their album "Animals". Great album.

The flying pig is prevalent on the album cover and throughout the lyrics insert.

The Mad Jammer

And then...there was nothing

Posted

When creating the new subscript you have to reset the find request.

I always create the subscript, then perform the new find, then edit the subscript, close it, and check "replace" for Finds.

That'll solve your problem.

Posted

danjacoby,

I did precisely what you instructed and have my reports working correctly now. Thanks for your help and also to Fitch for his input.

The Mad Jammer

And then...there was nothing

Posted

Ah, I misunderstood... I was thinking you were running the same subscript from many master scripts instead of the other way around. Glad to see you've got it figured out. .

PS: the flying pig is nothing to do with your favorite band, although they are a fine band -- it's a symbol of skeptics.

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