Webpage - Showing/Hiding Widget/widgets on button click

Hi, I am look to be able to show/hide a widget or set of widgets when a button is clicked on a LC web page.

I have the widgets and buttons created, but I can seem to find a way to set a show/hide dependency for it.

is there a way to do this with the low code or will I need to do it with JavaScript in code studio?

Hi William,

The easiest way from what you have described, would be to create Boolean called “Show Widgets”, place it on the page in question and have it so when you click the button it sets the Boolean. Then create a dependency on the widgets that says if “Show Widgets” is not equal to Yes, then Hide. Also set the Boolean to be shown as a “Hidden Item” on the page. Hope this helps! MP

1 Like

see, i tried that as it made sense to me but it has not worked… let me try again. i must have missed something!

Thank you for your response.

You’re welcome. Shout if you get stuck! MP

Hi Mark,

I am having issues getting the button to change the Boolean. could you explain how thats done?

Morning Sir,

So you create an event called “Set Show Boolean” and assign it to your button.

Then, using the new Event as your trigger, create a new rule also called “Set Show Boolean”. The response is “Set Field Value”, select your Boolean field and tell it to set the Boolean to Affirmative (Click).

Please make sure the base object of the rule is the same as the object that contains the Boolean you are trying to set. That should do the trick.

Again, reach out if you don’t crack it. Cheers - MP

Sorry Mark, me again.

I am doing battle with this.

So i understand what you have suggest. and that is how i set it up originally, but its not working.

I have a Information Widget with base object,

In that Widget i have:
Action Link
Boolean Object
Variable Link

When i click the Action link - It triggers the event “Trigger Boolean” that sets of the rule “Trigger Boolean” that sets the field value of the Boolean Object to Yes, wich then shows the Variable link.

The boolean and the variable link work fine, but when i hit the action link i get redirected to an error page that states,

“Sorry the page is missing or Unavailable”

Am i missing something, or using the wrong element?

Hi William,

I’m sure it’s something simple. If you are struggling after lunch you could invite me to a Teams meeting perhaps, where you could screen share with me and I can see what is going on. My Email is mark.pearson@netcall.com

MP

I’m confused now. Variable link? You made no mention of a variable, and the button should not have a link attached to it. The button should do one thing alone, and that is to trigger the rule that sets the boolean. Does the boolean set when you click the button? There should be nothing in this process that navigates you way from the page you are on and give the the missing page message. If we meet on teams I can show you how to do this in 2 minutes start to finish, unless I’m missing something :slight_smile: