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

Create Search Script with a Checkbox field


jkonnyck

Question

I am trying to create a script to segregate a group of records using a checkbox.  In fig 1  I have a group of record.  In fig 2  I have selected 4 records by clicking the checkbox field (symbol X).  If i go to the top of the page and click find, then manually click the checkbox (which enters the X) then click on Perform Find, it works!  But I cannot seem to create a script to perform the same function.  Any ideas?

 

1149429309_ScreenShot2021-01-11at9_20_23PM.png.b198b12158d1c3c03ddec1a9daa15853.png1902285_ScreenShot2021-01-11at9_20_53PM.png.493a421c3d96e3abe3fbed1ec99453dd.png488652162_ScreenShot2021-01-11at9_21_15PM.png.092e457663d63f6713e6b7f1a2f649f5.png

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

Enter Find Mode [] <—— don't restore, don't pause

Set Field [YourTable::CheckBoxField; "103 Parkfront Ln"]

New Record/Request

Set Field [YourTable::CheckBoxField; "19928 Casa Verde"]

New Record/Request

Set Field [YourTable::CheckBoxField; "9948 Cherry Hills"]

New Record/Request

Set Field [YourTable::CheckBoxField; "10393 Yorkstone Dr"]

Perform Find [] <—— do not restore requests here either

 

 

Link to comment
Share on other sites

  • 0

(You didn't say how your attempt was structured but most likely you were telling FileMaker to find records that had all those values in the same record)

Link to comment
Share on other sites

  • 0

My apologies.  I should have explained that the addresses are each a separate record and the pis I posted was a list view layout.  I'm simply trying to create a find to show only records I selected using the checkbox.

 

Link to comment
Share on other sites

  • 0

I assumed that.  My answer assumes that as well.  Each address is a separate record.  That's what I was saying:  that *most likely* your attempt at scripting would result (wrongly) in a Find that would look for a single record containing ALL of those addresses... and would fail, because none of them do.

 

Link to comment
Share on other sites

  • 0

But if I manually click on the "Find" button at the top, then click the checkbox and perform a find, it works perfectly.  I'm just wondering if there's a way for me to select the records manually and then use a script to perform the find. 

Fig 1.png

Fig 2.png

Fig 3.png

Link to comment
Share on other sites

  • 0

It’s more of a nerdy thing. I was hoping to create a button action that would simply do the find after I ticked off the records I wanted to segregate. (Of course I’d probably want another button to clear the “x” out of the checkbox afterward to deselect those records!)

Link to comment
Share on other sites

  • 0

Attach the single script STEP "Perform Find" to the button.

And unless there's something unusual about your structure, the very act of performing the Find should, itself, deselect the "x" from the records, assuming you check the checkboxes while you're in Find Mode.

Link to comment
Share on other sites

  • 0

First,

Thanks for all your help!  I tried assigning a single step to the button as shown and it worked! 

Now, when I try clearing the "X" value using "Clear Field" it only clears the "X" on the single highlighted record.  Is there a way to clear the "X" on all records?

Link to comment
Share on other sites

  • 0

Write a script that does this, and attach this script to the button instead of the single script step Perform Find:

 

Perform Find [as above]

Replace Field Contents [no dialog, Budget::SELECT  ""]

Link to comment
Share on other sites

  • 0

AHunter3.  Thanks again for all your help.  I added a zero in calculated result and it worked!  I appreciate all your time and knowledge. Stay well

1119343214_ScreenShot2021-01-13at8_38_29AM.png.a11bfe51ae99ce3f037c14355c5eb346.png

Link to comment
Share on other sites

  • 0

Not "0"; blank!  ("")  <-- two quotation marks with nothing in between.  That's how you set your field to blank in Replace Field Contents.

The "0" will look empty in a checkbox-formatted field but it means you're leaving zeros in that field.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use