Using 'Get Value From URL' with decision box field

Hello!

I’m trying to use URL parameters as described in https://docs.tadabase.io/guides-and-faqs/article/build-filtered-presets-to-save-as-custom-views, and I’m unsure of the expected values for decision box fields. For reference:

In the image above I’m unsure which pre-defined operator to select (the options are ‘is unchecked’,‘is checked’,‘is not unchecked’, and ‘is not checked’). My thinking is that whether the box is checked should vary depending on the passed query string.

In addition, I’m unsure what value the query string should get. I’ve tried testing with values like ‘0’, ‘1’, ‘true’,‘false’,‘checked’,‘unchecked’, but none are having an effect on the output table (although other non decision box fields work correctly).

Any advice would be greatly appreciated!

Can you give us a little more information about what you’re trying to do? Where is this field, what module are you using to set the URL parameters, what’s the desired outcome?

I can answer your second question though - to set a decision box, try using on/off as the values.

1 Like

Sure!

The decision box field resides in a ‘Reviews’ data table, and is not a connected field.

Here’s an image from the data builder of the decision box form field that is causing problems:

I’ve set the URL parameters by hand in the address bar for testing, and also via javascript (when the user clicks a button, they are redirected with ‘window.location.href’). Both these methods are working for the other fields in the form.

After I add the field to the form it looks and works as expected:

(There are no updated reviews in the data table so this output is accurate)

When I try to set the decision box field to use URL parameters, the form requires I change the style to ‘Dropdown’ and select ‘Pre-defined’ for operators:

After applying these settings, the query string parameter for the decision box is not having an effect on the table (it seems on/off isn’t working here either):

image

Decision box doesn’t work with URL parameters in the search component. I would suggest switching your Decision Box to a checkbox instead. Then set your predefined selection to “is” or “contains” and then the URL parameter will work.

1 Like

Thanks so much! This worked like a charm.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.