AnsweredAssumed Answered

Cannot use "Check In" for Lending Library in IWP

Question asked by CarmenSt.Jean on Aug 25, 2010
Latest reply on Aug 25, 2010 by CarmenSt.Jean

Title

Cannot use "Check In" for Lending Library in IWP

Post

Hello,

I have a database that I've built off of FileMaker's "Lending Library" starter solution.  Basically, I want users to be able to check equipment in and out.  This works perfectly in FileMaker Pro 11 (the program itself, I mean), but I cannot do the "Check In" process for equipment from the IWP.  Is this a known issue?  Is there a way around it?

When the user presses the "Check In" button, it launches a script called "Equipment Check In - Part 1," which in turn launches "Equipment Check In - Part 2."

Here are the two scripts:

Equipment Check In - Part 1

Freeze Window
If [Equipment::Status = "Available"]
   Beep
   Show Custom Dialog ["Message"; "This asset is currently checked in."]
Else
   If [equipment_HISTORY_Equipment ID Flag Checked Out::Flag Checked Out]
      Go to Related Record [From table: "equipment_HISTORY_Equipment ID Flag Checked Out"; Using layout: "Process Check Out" (History)]
      Perform Script ["Equipment Check In - Part 2"]
   End If
   Perform Script ["Go to Equipment Form View"]
   Set Field [Equipment::Status; "Available"]
End If
Commit Records/Requests [No Dialog]

And

Equipment Check In - Part 2

Set Field[History::Check In Date; Get(CurrentDate)]
Set Field[History::Check In Time; Get(CurrentTIme)]
Set Field[History::Flag Checked Out; ""]
Commit Records/Requests [No Dialog]

I know that these scripts don't do someone any good who is unfamiliar with my database, but is there any error here that is blatantly obvious?  Are there any scripts I chose that don't work well in IWP?

Thanks in advance.

Outcomes