Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Find and print


shawsy
 Share

Recommended Posts

I a setting up a database and i am using check boxes to indicate when i need to print two types of records.

 

i want to search for these records sort them and then print them and once printed i need the check boxes to be unchecked so that i do not print any records that i do not need.

 

Can anyone help?? confused.gif

Link to comment
Share on other sites

Hi Shawsy,

 

This may help. (The syntax isn't perfect, but close enough to follow ...)

 

Show all records

Go to layout (the appropriate layout)

Go to record/request page (first)

Loop

If (your checkbox field) = "(Your value list item - eg: Print This)"

omit record

Go to record/request page (next) (exit after last)

else

Go to record/request page (next) (exit after last)

end if

End Loop

Show Omitted

 

Now something along the lines of:

 

Go to record/request page (first)

Loop

Clear (your checkbox field)

Go to record/request page (next) (exit after last)

End Loop

Go to record/request page (first)

Sort (As per your needs ...)

Print

 

You can have Filemaker recognise the print and sort set-ups for this script, or else use a dialogue box.

 

WhiskyWolf

Link to comment
Share on other sites

Find the records with an entry in the field (check boxes are stored in a common field).

After going this manually, you can store it in the script as a "Perform Find" script step.

 

Then:

Go to record (first)

set field (Your checkbox field) ""

Replace (without dialogue)

exit script

 

This effectively empties the field on all records which had data in that field.

 

Tom

Link to comment
Share on other sites

on 03/15/03 5:19 PM, [email protected] at [email protected] wrote:

 

> Hi Filemakin Tom,

>

> Just a quick hello from Shawsy from the filemaker cafe.

>

> I have a couple of questions regarding scripting in filemaker pro and as i am

> a newbie at it i thought i would ask someone who knows what they are doing.

>

> How do i find all the fields (check boxes i only have two to check yes & no)

> that have been checked (ie yes) then to sort them, print them that i have

> found and finally all the ones that i have found are to be unchecked after

> they are printed.

>

> Can you please help me as it is driving me crazy as i am a newbie to the

> filemaker pro world I usually use access but have found that filemaker is

> easier and a lot more business like to use.

 

Check Boxes and radio buttons are stored in a common field behind the scenes, no matter how many choices are available. In the case of check boxes, where several selections are possible, the selections are separated by commas . . . whereas the selection of a radio button cancels all other selections, so the field has only one entry. In the case of only "Yes" or "No" you are much better off using radio buttons so that the user does not enter BOTH yes and no into the field.

 

To see this, drag a copy of the field onto your layout next to the check box field but do not designate it a a check box or radio button. Then click the check boxes. You will see "Yes" or "No" appear in the field. If a check box, you actually could check BOTH Yes and No, and they would BOTH appear in the field.

 

The fact is that behind the scenes, it is actually a text field (In both Radio Buttons and Check boxes) which allows one to perform a find for a particular entry.

 

So, while the field is still on your layout, enter find mode, type "Yes" into the text field and press enter or return. This will find all of the Yes answers to the exclusion of all other records. Now before doing anything else, create a script (let's call it "Retrieve") and as the first step, select "Perform Find" [Restore] and this will record the action you just took in finding the yesses. Close the script.

 

Reopen the script and add all of the steps you wish to preview/print the report, etc. When all is OK, add:

 

Go to Record/Request [first]

Go to field (Your check box field) [select/perform]

Set Field [Your check box field,""] (Double quotes will empty the field)

Replace [Current contents, No dialog]

 

This will go to the first record in the found set, set the check box field to empty then replace the contents of that field with nothing in all of the remaining records.

 

Then add the steps to return to wherever you wish to be.

 

Let me know if you have any problems.

 

Tom

Link to comment
Share on other sites

Perform Find (restore)

If [status: (CurrentFoundCount) => 1

Go to Layout (ie two)

Print

Go to layout (ie three)

Print

Go to Layout (ie one)

Go to Record/Rquest/Page [First]

Go to Field[select/perform,"radio button field"]

Set Field["radio button field",""]

Replace [No dialog,"radio button field","Current contents"]

Else

Beep

EndIf

Find all

Exit Script

 

Try the above. It's possible that "Replace" does not work unless the field is on the layout. So, by going back to the ie one1 layout, it should work.

 

However, you can also do this:

 

Perform find [restore]

If [status: (CurrentFoundCount) => 1

Go to layout [ie two]

Page Setup (Or Print Setup in Windows) "This saves the print parameters last used)

Print

Go to layout [ie three]

Print

Go to layout [ie one]

Go to Record/Rquest/Page [First]

Loop

Set Field [radio button field,""]

Go to Record [Next] (Exit after last) Be sure this is checked or you will be in a continuous loop)

End Loop

Else

Beep

EndIf

Find All

Exit script

 

can i add colour to the whole page?>>

 

Click once on a body part (It will highlight) then select a fill color from the fill palette on the status bar.

 

You can do it for all parts.

Link to comment
Share on other sites

Perform Find (restore)

If [status: (CurrentFoundCount) => 1

Go to Layout (ie two)

Print

Go to layout (ie three)

Print

Go to Layout (ie one)

Go to Record/Rquest/Page [First]

Go to Field[select/perform,"radio button field"]

Set Field["radio button field",""]

Replace [No dialog,"radio button field","Current contents"]

Else

Beep

EndIf

Find all

Exit Script

 

Try the above. It's possible that "Replace" does not work unless the field is on the layout. So, by going back to the ie one1 layout, it should work.

 

However, you can also do this:

 

Perform find [restore]

If [status: (CurrentFoundCount) => 1

Go to layout [ie two]

Page Setup (Or Print Setup in Windows) "This saves the print parameters last used)

Print

Go to layout [ie three]

Print

Go to layout [ie one]

Go to Record/Rquest/Page [First]

Loop

Set Field [radio button field,""]

Go to Record [Next] (Exit after last) Be sure this is checked or you will be in a continuous loop)

End Loop

Else

Beep

EndIf

Find All

Exit script

 

can i add colour to the whole page?>>

 

Click once on a body part (It will highlight) then select a fill color from the fill palette on the status bar.

 

You can do it for all parts.

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use