jlsnavely
asked on
Using a variable field to constrain a find
I am trying to constrain a found set by selecting an employee name from a new window. I use one script Test_Open to open the window, Test_Close to close the window, Test_Find to constrain the found set, and finally Test_Print to print the report. I have tried multiple approaches but have been unable to constrain the found set with the variable field. The scripts are shown below. Any help would be greatly appreciated. Thanks.
Test_Open
Allow User Abort [ Off ]
New Window [ Name: "Specify Account Executive"; Height: 400; Width: 650; Top: 220; Left: 285 ]
Go to Layout [ “FS_Snavely_AE_Report_Acti ve” (FS_CONTACTS) ]
Go to Portal Row
[ Select; First ]
Show/Hide Status Area
[ Lock; Hide ]
Set Zoom Level
[ Lock; 100% ]
Pause/Resume Script [ Indefinitely ]
Test_Close
Set Variable [ $A_E; Value:"\"" & FS_Employees::Employee_Nam e & "\"" ]
Close Window [ Current Window ]
Perform Script [ “Test_Print” ]
Halt Script
Exit Script [ ]
Test_Find
Set Error Capture [ On ]
Set Field [ COMPONENTS::$A_E; $A_E ]
Enter Find Mode [ ]
Perform Find [ Specified Find Requests: Find Records; Criteria: COMPONENTS::Project_Status : “=Active” ]
[ Restore ]
Constrain Found Set [ Specified Find Requests: Find Records; Criteria: COMPONENTS::Design: “=Yes” ]
[ Restore ]
Constrain Found Set [ Specified Find Requests: Find Records; Criteria: COMPONENTS::Project_Compon ent_Type: “="Print:"” ]
[ Restore ]
Sort Records [ Specified Sort Order: PROJECTS::Client_Name_and_ Contact; ascending
COMPONENTS::Project_Compon ent_Number ; ascending
COMPONENTS::Project_Compon ent_ID; ascending ]
[ Restore; No dialog ]
Set Error Capture [ Off ]
Exit Script [ Result: Get ( FoundCount ) ]
Test_Print
Allow User Abort [ Off ]
Perform Script [ “Test_Find” ]
If [ Get ( ScriptResult ) > 0 ]
New Window [ Name: "Print Preview"; Height: 650; Width: 809; Top: 120; Left: 30 ]
Go to Layout [ “R_Print_Concept_Developme nt” (COMPONENTS) ]
Show/Hide Status Area
[ Lock; Toggle ]
Set Zoom Level
[ Lock; 100% ]
Print Setup [ Orientation: Landscape; Paper size: 8.5" x 11" ]
[ Restore; No dialog ]
Print [ Records being browsed; All Pages; Orientation: Portrait; Paper size: 8.5" x 11" ]
[ Restore: HP LaserJet 5100 ]
Close Window [ Name: "Print Preview"; Current file ]
Exit Script [ ]
Else
Show Custom Dialog [ Title: "No Records Found"; Message: "No records were found that match this search request. Select OK to return to Reports."; Buttons: “OK” ]
End If
Again, many thanks for any help with this issue.
Test_Open
Allow User Abort [ Off ]
New Window [ Name: "Specify Account Executive"; Height: 400; Width: 650; Top: 220; Left: 285 ]
Go to Layout [ “FS_Snavely_AE_Report_Acti
Go to Portal Row
[ Select; First ]
Show/Hide Status Area
[ Lock; Hide ]
Set Zoom Level
[ Lock; 100% ]
Pause/Resume Script [ Indefinitely ]
Test_Close
Set Variable [ $A_E; Value:"\"" & FS_Employees::Employee_Nam
Close Window [ Current Window ]
Perform Script [ “Test_Print” ]
Halt Script
Exit Script [ ]
Test_Find
Set Error Capture [ On ]
Set Field [ COMPONENTS::$A_E; $A_E ]
Enter Find Mode [ ]
Perform Find [ Specified Find Requests: Find Records; Criteria: COMPONENTS::Project_Status
[ Restore ]
Constrain Found Set [ Specified Find Requests: Find Records; Criteria: COMPONENTS::Design: “=Yes” ]
[ Restore ]
Constrain Found Set [ Specified Find Requests: Find Records; Criteria: COMPONENTS::Project_Compon
[ Restore ]
Sort Records [ Specified Sort Order: PROJECTS::Client_Name_and_
COMPONENTS::Project_Compon
COMPONENTS::Project_Compon
[ Restore; No dialog ]
Set Error Capture [ Off ]
Exit Script [ Result: Get ( FoundCount ) ]
Test_Print
Allow User Abort [ Off ]
Perform Script [ “Test_Find” ]
If [ Get ( ScriptResult ) > 0 ]
New Window [ Name: "Print Preview"; Height: 650; Width: 809; Top: 120; Left: 30 ]
Go to Layout [ “R_Print_Concept_Developme
Show/Hide Status Area
[ Lock; Toggle ]
Set Zoom Level
[ Lock; 100% ]
Print Setup [ Orientation: Landscape; Paper size: 8.5" x 11" ]
[ Restore; No dialog ]
Print [ Records being browsed; All Pages; Orientation: Portrait; Paper size: 8.5" x 11" ]
[ Restore: HP LaserJet 5100 ]
Close Window [ Name: "Print Preview"; Current file ]
Exit Script [ ]
Else
Show Custom Dialog [ Title: "No Records Found"; Message: "No records were found that match this search request. Select OK to return to Reports."; Buttons: “OK” ]
End If
Again, many thanks for any help with this issue.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
ASKER
Open Window
Allow User Abort [ Off ]
New Window [ Name: "Specify Account Executive"; Height: 400; Width: 650; Top: 220; Left: 285 ]
Go to Layout [ “FS_Snavely_AE_Report_Acti
Go to Portal Row [ Select; First ]
Show/Hide Status Area [ Lock; Hide ]
Set Zoom Level [ Lock; 100% ]
Close Window
Allow User Abort [ Off ]
New Window [ Name: "Specify Account Executive"; Height: 400; Width: 650; Top: 220; Left: 285 ]
Go to Layout [ “FS_Snavely_AE_Report_Acti
Go to Portal Row [ Select; First ]
Show/Hide Status Area [ Lock; Hide ]
Set Zoom Level [ Lock; 100% ]
Find
Set Error Capture [ On ]
Perform Find [ ]
Constrain Found Set [ Specified Find Requests: Find Records; Criteria: COMPONENTS::Project_Status
Constrain Found Set [ Specified Find Requests: Find Records; Criteria: COMPONENTS::Design: “=Yes” ] [ Restore ]
Constrain Found Set [ Specified Find Requests: Find Records; Criteria: COMPONENTS::Project_Compon
Set Error Capture [ Off ]
Exit Script [ Result: Get ( FoundCount ) ]
Print
Allow User Abort [ Off ]
Perform Script [ “Find_Active_Print_Concept
If [ Get ( ScriptResult ) > 0 ]
New Window [ Name: "Print Preview"; Height: 650; Width: 809; Top: 120; Left: 30 ]
Go to Layout [ “R_Print_Concept_Developme
Show/Hide Status Area [ Lock; Toggle ]
Set Zoom Level [ Lock; 100% ]
Print Setup [ Orientation: Landscape; Paper size: 8.5" x 11" ] [ Restore; No dialog ]
Print [ Records being browsed; All Pages; Orientation: Portrait; Paper size: 8.5" x 11" ] [ Restore: HP LaserJet 5100 ]
Close Window [ Name: "Print Preview"; Current file ]
Exit Script [ ]
Else
Show Custom Dialog [ Title: "No Records Found"; Message: "No records were found that match this search request. Select OK to return to Reports."; Buttons: “OK” ]
End If
Thanks again... and I did this without having to use a "$$"