AnsweredAssumed Answered

Script Problem

Question asked by StevenEmms on Sep 26, 2011
Latest reply on Sep 27, 2011 by DavidJondreau

Title

Script Problem

Post

Hay guys I’m having a problem with a script.

 

Part of it works, it’s only the If statement that are proving a problem.

The script is preformed on a button click.

 

Go to Field [Repairs::To]

Copy [Select]

Go to Field [Item 2::CurrentLocation]

Paste [Select]

If [Repairs::From = 1]              - have tried with If [Repairs::From = "1"]

   Set Field [Item 2::Status; "Client"]

Else If [Repairs::To = 2]           - have tried with If [Repairs::To = "2"]

   Set Field [Item 2::Status; "Repair"]

Else

   Set Field [Item 2::Status; "Client"]

End If

Commit Records/Requests [No Dialog]

 

I have attached an image of the relationship and the layout, black arrow is the button, red arrows are the fields in the script.

 

Thanks

   Steve

Untitled.png

Outcomes