How to retrieve the Option Set value that equals a specific text?

Hi community!

I am looking to define the state of an element by using the Hovered Label value on a Pie Chart (Chart.JS plugin by Techblocks @help6). I am doing this through a workflow as follows:

  1. When the user hovers the pie chart, the state “categorytext” of the element “Group Budget Pie Chart” changes to the text in the Hovered Label value. (No issues here).

  2. I then use the categorytext to search for an Option Set. the Option Set is of type “category” and not "text. So I filter the Option Set with the condition that the Budget Category DISPLAY is equal to the categorytext. HOWEVER, it is not finding any Option Set.



1 Like

This is working as expected because in your option set you do not have a value of Insurance

Screen Shot 2024-05-28 at 5.35.36 PM

Instead you have a value of Employment Insurance Benefit

1 Like

The “Insurance” value is there, it just didnt show on the pic. The problem is on the filtering step. Any idea?

Find below another examples with a different category (Transportation)


):

I recently used option sets to set the TITLE tag for the page for SEO reasons. I put some key pairs together for the Meta Title and Descriptions and then filtered it by URL.

Perhaps this is an approach you could use?

Can I see your filter constraints. I have a feeling you may have missed out a step. Or there is possibly a character set issue that is messing up the filter.

Can you provide a screen shot?

Thanks Alan for taking a look.

Trying to match the Budget Category Option Set based on the Hovered Label Value on a Pie chart. I dont know if the URL approach would work…?

Check out the filter constraint below. See that the categorytext (which is defined in the previous action) is being used to locate the specific Budget Category.

Say if I replace “categorytext” for “Transportation”, it works perfectly (as below):

Thoughts>?

Yeah, we can leave how it is triggered (the URL element you refer to in my example until later).

Let’s get the filtering working first and then we can worry about how to trigger it (I suspect something like Is Hovered will do the trick).

Can you show a screenshot of your Option set please, with all the extra fields too. I want to see what the expression means in terms of the option set itself to check out the filter process.

1 Like

Alan, as always, the more tinkering done, the closer to the solution.

I found the solution, clearly it was simple. The order of the constraint matters. If I re-order the parameters, and use “contains” instead of “is”, it appears to works (see below).

Thank you thou for putting time to help me!!! Really appreciate it!

2 Likes

Nice job. Well done.

1 Like