Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

looping asset "return" script

Featured Replies

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.

 

Solved by comment

Go to solution
  • Solution

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).

  • Author

Perfect. Thank you Comment.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.