Change attribute of option set when page loads

Hi,
I am looking at building a page submenu using option sets in repeating group. The way I have layout option sets is as below with menu item name and status

What I want to achieve is to make the respective Option set bold when the page loads. In order to do that what I was thinking is when page loads if I can change the respective Option set active status to yes through workflow then in the element properties I can add a condition to make the respective option bold.

Can anyone help me pointing in right direction on how I can achieve this?
Thanks in advance

option sets are static, you can modify them only manually in the editor and they will be in your live app next time you publish.
You can explore other options like custom states of you need a value that changes on page load but not globally for every user of the app.

1 Like

Hi @dorilama thanks for reaching out to help. Actually I am building a SaaS app, the reason why having these menu items on options sets or on Db will beneficial is because, I can control the page access and menu display. I am able to control the page access but what I am unable to do is make the menu item bold and change color for the current page name. I am really struggling to figure that out now. Any thoughts or suggestions will be very helpful on how I can achieve this
Thanks

Have you tried adding a condition to the text element to make it bold? In the condition you can use get data from page url

@dorilama yes I did get data from page url contains the page name then highlight. But what is happening it that, it is highlighting all the menu items in the repeating group because the data is contains the page name.

As I said, the active state can’t be in an option set because options sets are static. It can’t be in the db because a menu item is not active for all your users.
If you have a menu with home and profile get the data from page url and build a condition that make sense to set only one active.
You can store in the option set how the url path should be for that specific menu item.

@dorilama Thanks
I have given up that method and I have now created this as a Reusable element with responsive groups. Each group has a condition, when the url contains page name set background. Also I can add current user permission to each group to access the menu. This way I can maintain and reuse in all pages

This topic was automatically closed after 70 days. New replies are no longer allowed.