Instead of hiding the fields that make up the record on that layout, simply omit them from the found set. This can be done a number of ways--including a script performed by the OnLayoutEnter trigger.
Is there any way you can give me a step by step of the cleanest way to do this?
Sorry. I am relatively novice.
I can outline two general approaches, how you implement them is up to you.
I don't know what value you are assigning when you click that check box so will assume that it is a single check box value with the field empty if the record is not selected and not empty if it is:
Enter Find Mode [Pause:Off]
Set Field [ YourTable::yourCheckBoxField ; "*" ]
Set Error Capture [on]
Perform Find [ ]
If [Get ( FoundCount ) = 0 ]
Show Custom Dialog ["Currently, no records are selected."]
Let's assume that the value 1 is assigned to the field if you click the check box and it's empty if you clear the check box. If you used a different value, only a small adjustment is needed.
Set up a relationship to an occurrence of your table. You can use a match field that is a calculation field that always evaluates as 1 as the match field to the check box field or you can set up a Cartesian Join with the X operator instead of = and add a portal filter expression such as:
Not Isempty ( PortalTableOccurrence::CheckBoxField )
To limit the listed records to just those with the check box selected.
In either case, you would need to base your layout on one table occurrence and add a portal based on what I have called "portalTableOccurrence" in the above portal filter sample expression.
Your set field is missing the calculated result parameter:
That's amazing. Perfect. Thank you so much!!
Script triggers are a pain sometimes and often it is simpler to write the script and call it from a button etc.
perform find step can be set to find or omit records based on the contents of the field you describe and it is only one step.
and you can use it with a parameter nested inside a report script.
if parameter = show
perform find field = show
perform find field = hide
This is far simpler than what you are trying to do and the results are reliable and most important you could have written the script faster than the question you asked and most certainly pouring through all of the answers.