AnsweredAssumed Answered

Identical Script Gives Error While 1st Script Doesn't

Question asked by VeronNovosad on Mar 19, 2012
Latest reply on Mar 19, 2012 by philmodjunk

Title

Identical Script Gives Error While 1st Script Doesn't

Post

Can anyone tell me why the following script provides me with the reports for the specified criteria,

 Enter Find Mode [  ]

Set Field [ MSDS::Chemical; "" ]

Set Field [ MSDS::Manufacturer; "" ]

Show Custom Dialog [ Title:"Enter Search Parameter"; Message: "Enter the chemical or manufacturer below:"; Buttons:“OK” , “Cancel”; Input #1:MSDS::Chemical :"; Input #2:MSDS::Manufacturer, "Manufacturer" ]

If [ Get ( LastMessageChoice) = 1 ]

If [ IsEmpty ( MSDS::Chemical ) = 0 ]

Go to Layout [ “MSDS Report by Chemical” (MSDS) ]

End If

If [ IsEmpty ( MSDS::Manufacturer ) = 0 ]

Go to Layout [ “MSDS Report by Manufacturer” (MSDS) ]

End If

Perform Find [  ]

 Sort Records [ Specified Sort Order:MSDS::Chemical MSDS::Manufacturer [ Restore; No dialog ]

End If

 And the following identical script provides me with the error shown below?

 Enter Find Mode [  ]

Set Field [ Chemical Inventory::ChemicalInInventory; "" ]

Set Field [ Chemical Inventory::InventoryOfFacility; "" ]

Show Custom Dialog [ Title:"Enter Search Parameter"; Message: "Enter the chemical or facility below:"; Buttons:“OK”, “Cancel”; Input #1: Chemical Inventory::ChemicalInInventory Input #2:Chemical Inventory::InventoryOfFacility, "Facility" ]

 If [ Get ( LastMessageChoice) = 1 ]

If [ IsEmpty ( Chemical Inventory::ChemicalInInventory) = 0 ]

Go to Layout [ “Chemical Inventory by Specific Chemical Report” (Chemical Inventory) ]

End If

If [ IsEmpty ( Chemical Inventory::InventoryOfFacility ) = 0 ]

Go to Layout [ “Chemical Inventory by Specific Facility Report” (Chemical Inventory) ]

End If

Perform Find [  ]

Sort Records [ Specified Sort Order:Chemical Inventory::ChemicalInInventory Chemical Inventory::InventoryOfFacility [ Restore; No dialog ]

End If

 Error Shown

The provided find criteria is not valid. Enter a valid request before proceeding.

 

Outcomes