Jump to content
Server Maintenance This Week. ×

Simple script works, more complex doesn't!


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

Recommended Posts

Hi,

I'm using a simple script to run a report - the user presses a button to bring up a custom dialogue box in order to input the Company Code which limits the report to one company. The attached script does just that.

However, one of our companies needs a report which omits one person's details (Contact ID); it also needs a report which will run a report based on just that one person's details. I've tried adding another custom dialogue based on "If this particular company code is entered bring up another dialogue box asking whether the report should be run just for the individual" but this doesn't work.

I've either attacked this in an illogical way (quite probably) and/or I'm getting the syntax wrong. I'd really appreciate some ideas of how to get around this.

Sara

ClientstatusreportScript.pdf

Link to comment
Share on other sites

How about something like:

Go to Layout [ "19. Client Status Report" (tbl_job_bag 3) ]

Enter Find Mode [ ]

Show Custom Dialog [ Title: "Create Client Status Report"; Message: "Please enter the 3 character Company Code:"; Buttons: "OK", "Cancel"; Input #1: tbl_company_location 5::Company Code, "Company Code:" ]

If [Get(LastMessageChoice) = 1]

If [tbl_company_location 5::Company Code = {a particular company code}]

Show Custom Dialog ["Should this report be run for the individual only?"; Buttons: "Yes", "No"]

If [Get(LastMessageChoice) = 1]

Set Field [Contact ID; {desired id}]

Else

New Record/Request

Set Field [Contact ID; {desired id}]

Omit Record

End If

End If

Perform Find [ ]

Sort Records [ Specified Sort Order: tbl_job_bag::Job No; ascending

tbl_job_bag::Status; ascending

tbl_job_bag::Artwork Deadline; ascending ]

[ Restore; No dialog ]

Enter Preview Mode

[ Pause ]

Perform Script [ "16a. Print Dialogue Landscape" ]

End If

Enter Browse Mode

Go to Layout [ original layout ]

Link to comment
Share on other sites

This topic is 7017 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.