Answers.Body: <p>Yes, in the table display add a filter for the argument you want to allow to be passed in.  Set the value to be read from the URL and specify the field tag you want to use.  Then append <strong><code>#/?field=value</code></strong> to the URL.</p>
  <p>You can see an example of this in the core 'CiviCRM Administration UI' extension.</p>
  <p>The <a href="https://dmaster.demo.civicrm.org/civicrm/admin/afform#/edit/afsearchAdminCustomFields" rel="noreferrer">table configuration</a> includes:</p>
  <p><a href="https://i.sstatic.net/WBv3p.png" rel="noreferrer"><img src="https://i.sstatic.net/WBv3p.png" alt="enter image description here" /></a></p>
  <p>This enables the Custom Field Group id to be specified in the URL like this: <code>https://dmaster.demo.civicrm.org/civicrm/admin/custom/group/fields#/?gid=3</code></p>
  <p>(As always with FormBuilder/SearchKit, these features may only work in a newer version than your system uses.  This screenshot is from dmaster running 5.56.alpha1)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-08T13:37:00.580Z
Answers.Text: This worked great - I was missing the # and couldn't figure out what was wrong. Thank you!
Answers.UserDisplayName: guyiac
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-12-19T09:16:06.647Z
Answers.Text: Thanks for this! Was searching everywhere for the right format to use. Have created an issue asking for a screen tip on the Form Builder screen https://lab.civicrm.org/dev/core/-/issues/5653
Answers.UserDisplayName: Ben
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-17T13:56:49.443Z
Answers.LastActivityDate: 2022-10-17T13:56:49.443Z
Answers.UserDisplayName: Aidan
Body: <p>I see that Submission forms allow arguments to be passed in via the URL. Can the same be done for filters on Search Forms?</p>
  <p>Eg if I show Activities in a table that can be filtered by Assigned To contact, can I craft a URL that shows the Activities for the specified contact?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-10-12T19:40:58.500Z
Comments.Text: Not an answer, but I can't comment... Did you ever find a solution for passing variable through the URL? I'm trying to do the same thing, but I'm not clear on whether Form Builder is supposed to do that out of the box.
Comments.UserDisplayName: zip
Tags: <searchkit><formbuilder>
Title: Can filter values be passed in via the URL to Form Builder Search Forms?
ThreadText: # Can filter values be passed in via the URL to Form Builder Search Forms?
  
  (Asked by: username_0 on 2022-06-06)
  
  I see that Submission forms allow arguments to be passed in via the URL. Can the same be done for filters on Search Forms?
  
  Eg if I show Activities in a table that can be filtered by Assigned To contact, can I craft a URL that shows the Activities for the specified contact?
  
  **Tags:** searchkit, formbuilder
  
  > **Comments:**
  > **username_1**: Not an answer, but I can't comment... Did you ever find a solution for passing variable through the URL? I'm trying to do the same thing, but I'm not clear on whether Form Builder is supposed to do that out of the box.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-10-17. Score: 8
  
  Yes, in the table display add a filter for the argument you want to allow to be passed in. Set the value to be read from the URL and specify the field tag you want to use. Then append **`#/?field=value`** to the URL.
  
  You can see an example of this in the core 'CiviCRM Administration UI' extension.
  
  The [table configuration](https://dmaster.demo.civicrm.org/civicrm/admin/afform#/edit/afsearchAdminCustomFields) includes:
  
  [![enter image description here](https://i.sstatic.net/WBv3p.png)](https://i.sstatic.net/WBv3p.png)
  
  This enables the Custom Field Group id to be specified in the URL like this: `https://dmaster.demo.civicrm.org/civicrm/admin/custom/group/fields#/?gid=3`
  
  (As always with FormBuilder/SearchKit, these features may only work in a newer version than your system uses. This screenshot is from dmaster running 5.56.alpha1)
  
  > **Comments:**
  > **username_3**: This worked great - I was missing the # and couldn't figure out what was wrong. Thank you!  
  > **username_4**: Thanks for this! Was searching everywhere for the right format to use. Have created an issue asking for a screen tip on the Form Builder screen https://lab.civicrm.org/dev/core/-/issues/5653  
  
  ---
  
  