Jump to content

Perform Find And Variables


mfl

This topic is 4898 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have this script which currently performs finds and downloads an excel report for the user.

My question is in the Perform find can I send it a variable as the user now wants to select specific Vendors.

Or is there another way of doing this.


Allow User Abort [ Off ] Set Error Capture [ On ] Freeze Window If [ Purchase Orders::PO_ExcelCount = "" ]

Set Field [ Purchase Orders::PO_ExcelCount; Purchase Orders::PO_ExcelCount + 1 ]

End If If [ Get ( ScriptParameter ) = "Exit Open Production" ]

Set Variable [ $desktop; Value:"filemac:" & Get ( DesktopPath ) & "PO Exit Date Report" & Purchase Orders::PO_ExcelCount & ".xls" ]

Perform Find [ Specified Find Requests: Find Records; Criteria: Purchase Orders::PO_Type: “Production” Omit Records; Criteria: Purchase Orders::PO_Open_Closed: “Closed” Omit Records; Criteria: Purchase Orders::PO_Status_Req_Or_PO: “DELETED” ] [ Restore ]

Sort Records [ Specified Sort Order: Purchase Orders::PO_Date_Exit_Beginning; ascending ] [ Restore; No dialog ]

Export Records [ File Name: “$desktop”; Use field names as column names; Character Set: “Unicode (UTF-16)”; Field Order: Programs::Program_ID_ProgramNumberWithName

Programs::Program_Date_Event Programs::Program_Contact_Mondetta_Customer_Service Purchase Orders::PO_Supplier Programs::Program_Contact_Mondetta_Salesman Programs::Program_Contact_Mondetta_Merchandiser PO Data Per PO::POD_MondettaOr# PO Data Per PO::POD_ClientPo# PO Data Per PO::POD_Style_Num PO Data Per PO::POD_Description PO Data Per PO::POD_Cut_Ticket_Number PO Data Per PO::POD_Quantity Purchase Orders::PO_Ship_To_Address_Used Purchase Orders::PO_FOBorLDP Purchase Orders::PO_Ship_Via Purchase Orders::PO_Airing Purchase Orders::PO_Consignee Purchase Orders::PO_FreightForwarder Purchase Orders::PO_Broker Purchase Orders::PO_PortOfLoading Purchase Orders::PO_Date_Exit_Beginning Purchase Orders::PO_Date_Exit_End Purchase Orders::PO_Date_Exit_Cancel Purchase Orders::PO_DischargePort Purchase Orders::PO_Date_DelProposed PO Data Per PO::POD_PickTick# PO Data Per PO::POD_Invoice# PO Data Per PO::POD_SupInv# PO Data Per PO::POD_InvUnits Purchase Orders::PO_StatusDescription Purchase Orders::PO_StatusModDate Purchase Orders::PO_ID_Purchase_Order_Number_Production Production_Vendors_Bill_To::PV_Company_Name ] [ No dialog ]

End If If [ Get ( ScriptParameter ) = "Del Open Production" ]

Set Variable [ $desktop; Value:"filemac:" & Get ( DesktopPath ) & "PO Delivery Date Report" & Purchase Orders::PO_ExcelCount & ".xls" ]

Perform Find [ Specified Find Requests: Find Records; Criteria: Purchase Orders::PO_Type: “Production” Omit Records; Criteria: Purchase Orders::PO_Open_Closed: “Closed” Omit Records; Criteria: Purchase Orders::PO_Status_Req_Or_PO: “DELETED” ] [ Restore ]

Sort Records [ Specified Sort Order: Purchase Orders::PO_Date_DelProposed; ascending ] [ Restore; No dialog ]

Export Records [ File Name: “$desktop”; Use field names as column names; Character Set: “Unicode (UTF-16)”; Field Order: Programs::Program_ID_ProgramNumberWithName

Programs::Program_Date_Event Programs::Program_Contact_Mondetta_Customer_Service Purchase Orders::PO_Supplier Programs::Program_Contact_Mondetta_Salesman Programs::Program_Contact_Mondetta_Merchandiser PO Data Per PO::POD_MondettaOr# PO Data Per PO::POD_ClientPo# PO Data Per PO::POD_Style_Num

DecemberP2O0,D2a0t1a0P1e5r:P33O::2:P5OD_DescrPiputricohnase Orders.fp7 - E:020 > UpLoad Open Production	-1- PO Data Per PO::POD_Cut_Ticket_Number PO Data Per PO::POD_Quantity Purchase Orders::PO_Ship_To_Address_Used

Purchase Orders::PO_FOBorLDP

Purchase Orders::PO_Ship_Via

Programs::Program_Date_Event

Programs::Program_Contact_Mondetta_Customer_Service Purchase Orders::PO_Supplier Programs::Program_Contact_Mondetta_Salesman Programs::Program_Contact_Mondetta_Merchandiser

E: Import / Export: E:020 > UpLoad Open Production

PO Data Per PO::POD_MondettaOr# PO Data Per PO::POD_ClientPo# PO Data Per PO::POD_Style_Num PO Data Per PO::POD_Description PO Data Per PO::POD_Cut_Ticket_Number PO Data Per PO::POD_Quantity

Purchase Orders::PO_Ship_To_Address_Used Purchase Orders::PO_FOBorLDP Purchase Orders::PO_Ship_Via Purchase Orders::PO_Airing

Purchase Orders::PO_Consignee Purchase Orders::PO_FreightForwarder Purchase Orders::PO_Broker Purchase Orders::PO_PortOfLoading Purchase Orders::PO_Date_Exit_Beginning Purchase Orders::PO_Date_Exit_End Purchase Orders::PO_Date_Exit_Cancel Purchase Orders::PO_DischargePort Purchase Orders::PO_Date_DelProposed PO Data Per PO::POD_PickTick# PO Data Per PO::POD_Invoice# PO Data Per PO::POD_SupInv# PO Data Per PO::POD_InvUnits Purchase Orders::PO_StatusDescription Purchase Orders::PO_StatusModDate Purchase Orders::PO_ID_Purchase_Order_Number_Production ] [ No dialog ]

End If Set Field [ Purchase Orders::PO_ExcelCount; Purchase Orders::PO_ExcelCount + 1 ]

Show Custom Dialog [ Message: "Your Download is complete and located on your desktop."; Buttons: “OK”, “Cancel” ]

Thanks

Michael

Link to comment
Share on other sites

Michael

You will need to have a way for the user to select what Vendors they want to use in the find.

For this I would use a global field and a value list.

Then Pass this global field into the find.

You can't use a variable for User interaction.

Also if you want to allow more than one choice of vendor (i.e. find vendor A and Vendor B)you will need to break out each specific vendor using a Variable, then use a loop to add a new find request for each vendor.

Jerry

Link to comment
Share on other sites

This topic is 4898 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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