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

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

Recommended Posts

Posted

Hey All

 

Trying to implement an "express return" type feature in my asset management system. What I'm looking for is to have a dialogue window open (or modal window) upon an Express Return button being clicked, the asset id field is presented in which they scan or key in the asset id, upon enter that record is found, the Return Item script is performed, and the user is returned to the dialogue window ready to have the next ID entered. If the record isn't found, a beep is heard, and the user is returned to the dialogue window. Clicking cancel will exit the loop and dialogue box.

 

I have something along the following lines, but it doesn't work.

Freeze Window
Set Error Capture [On]
Loop
  Go to Layout [asset table]
  Enter Find Mode []
  Show Custom Dialog ["Express Return";"Enter asset ID to return item"]
  If [Get(LastMessageChoice) = 1]
    Perform Find []
    If [Get(FoundCount) = 1]
      Perform Script ["Mark Asset In"]
      Go to Layout [asset table]
    End If
  End If
  Else
    If [Get(FoundCount) = 0]
      Beep
      Enter Browse Mode []
    End If
  End If
  Exit Loop If [Get(LastMessageChoice) = 2]
End Loop
Enter Browse Mode []
Go To Layout ["Asset Directory"]
Show All Records

Can someone perhaps point me in the right direction? My apologies if my scripting is bizarre. I'm still a novice.

 

Posted

I believe something like the following should suffice - it's hard to be sure without seeing your "Mark Asset In" sub-script.

 

Go to Layout [asset table]
Set Error Capture [On]
#
Loop
    Enter Find Mode []
    Show Custom Dialog ["Express Return";"Enter asset ID to return item"]
    Exit Loop If [Get(LastMessageChoice) = 2]
    Perform Find []
    If [Get(FoundCount) = 0]
        Beep
    Else If [Get(FoundCount) = 1]
        Perform Script ["Mark Asset In"]
    Else 
        # WELL, WHAT WOULD YOU LIKE TO DO IF MORE THAN ONE RECORDS ARE FOUND?
    End If
End Loop
#
Enter Browse Mode []
Go To Layout ["Asset Directory"]
Show All Records

This could be further improved by changing the custom dialog's message when the find has failed (in addition to the beep).

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