AnsweredAssumed Answered

Script to pull un"Returned" / "overdue" rentals forward via button

Question asked by BERGSTEN on Feb 21, 2017
Latest reply on Feb 22, 2017 by philmodjunk



My latest issues is in trying to figure out the right script as to pull records that are past their load_out_date and not set to "Returned" in two different fields.

Ideally- we would press a button that would take us to the invoices layout- performing a search that would pull forward all of the records that were not toggled to returned, one day after it was supposed to be returned.


I had found the following script and was trying to modify it to my needs but have had no success. Either the find comes back with an error, or it tells me I'm all clear when I know I'm not. Based on what Im trying to do it doesnt seem like it should be this difficult! A little frustrated. Just when I thought I was getting better at scripting!


Go To Layout ["invoices" (Invoices)]

Enter Find Mode

Set Field [Invoices::Load_Out_date; ≤ Get(CurrentDate)]

Set field [Invoices::Prep_Status ≠ "RETURNED"]

Set field [Invoices::Prep_Status_audio ≠ "RETURNED"]

Pause [indefinitely]

Set Error Capture [On]

Perform Find []

If [Get(FoundCount)>0]

.. Show Custom Dialog ["These rentals weren't checked in" / OK]


.. Show Custom Dialog ["There are no rentals needing your attention" / OK]

.. Show All Records

.. Go to Layout [Main Menu Screen or Whatever]

End If