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

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

Recommended Posts

Posted (edited)

for those who read my previous topic "issue with script that has multiple finds", ignore all of that. i have boiled the problem down to one simple question...

here's my script:

Go to Layout ["Artist"]

Enter Find Mode [Pause]

Perform Find [Replace Found Set]

Go to Layout ["Artist Report"]

Sort [Restore, No Dialogue]

The Artist layout is a simple screen that says "Enter an Artist" and only shows the Artist field. After you enter the artist you want to search for, it performs the Find and displays the results using the Artist Report layout, which includes the YEAR, TITLE and FORMAT fields. For example, if you were to type in Eric Clapton, you would see all of the Eric Clapton albums I own. You would see the Year, Title of Album, and the format I have (i.e. CD, Cassette, Vinyl, etc).

When you enter an Artist that is not in my database, of course it says No Matching Records Found and you choose between Modify Find, Continue or Cancel. If I click Modify Find and enter a 2nd artist and that artist is also not in my database, instead of getting to Modify Find again, it goes to the Artist Report layout as though records were found. There just aren't any records listed. It's blank. All you see are the Field Names (Year, Title, and Format).

It seems like I should be able to enter an unlimited number of artists that are not in the database and always be given the chance to Modify Find, no matter how many times in a row No Matching Records are found. Is there something special I need to do in the script? Do I need to set up a loop that runs until records are found? I'm baffled!

any insight on this issue would be greatly appreciated.

thanks,

Sparrow

Edited by Guest
Quotes don't work in the Subject
Posted

This has changed with fm7, but you need before each new search to issue a Show All Records ...as far as I remember!

--sd

Posted

thanks for taking the time to reply. issuing a Show All Records only seems to buy me one more round. now i can enter two artists in a row that are not in my database and get the opportunity to Modify Find both times. if i enter a 3rd artist that is not in the database, it goes to the blank Artist Report w/ no chance to Modify Find.

anyone know why it is exiting the script? surely there is a way to set it up to where it doesn't matter how many times in a row No Matching Records are Found. again, i am wanting it to give me the chance to Modify Find over and over and over again if necessary. otherwise it is not too user-friendly.

Posted

Use a recursive call, with your own dialog popping up if there are no records found:

Find Script:

Go to Layout ["Artist"]

Enter Find Mode [Pause]

Set Error Capture [ On ]

Perform Find [Replace Found Set]

If [ status(currenterror) = 401 ]

Show Message [ "No records found.", Buttons: "Try Again", "Cancel" ]

If [ status (currentmessagechoice) = 2 ]

Go to Layout [ original layout ]

Show All Records

Halt Script

End If

Perform Script [ Find Script ]

Exit Script

End If

Go to Layout ["Artist Report"]

Sort [Restore, No Dialogue]

Posted

Ender,

thanks for the reply! the script you suggested is working perfectly. i understand the logic in it. only had to make one tiny change. had to change from Perform Script [Find Script] to Perform Script [sub-scripts, Find Script]. otherwise it was exactly what i needed.

also, was able to reincorporate a prior complexity that was causing problems before i took the new approach.

thanks again,

Sparrow

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