Cannot access the reusable element's state on Design Tab?

I have a menu reusable element. The menu is defined with a custom state at the parent level Force Sign Up = Yes/No.

When Force Sign Up = Yes, it will force signup on some pages of the app.

When I add this reusable menu on my page though, I cannot access the state of that reusable element.

I want to be able to turn this Force Signup state on and off depending on the page.

Edit: I’ve been able to access the state of the Reusable Element via Workflows to chang the state. However, I was expecting to change this state manually through the Element Inspector inside the Design Tab. Isn’t that possible?

you cant read the reusable element custom state, use url parameter , and set that parameter on parent page. and inside RE have a workflow which get trigger when ever that parameter is set.

I don’t want to do that via URL parameter, it should not be up to the user to decide what pages require signup and which don’t.

It seems I can set the state of the reusable element via workflows:

Is there no way to set the state as a fixed value via the Builder?

Hmm, when we were learning the bubble in airdev, we never used it, it may give you option to setup the RU parameter.

so you have a CS on top leverl RU, and inside that RU when the CS value is change you are running a workflow which show the signup popup, and you are setting the RU custome state on parent level.

and it still not showing the popup right

Hi data1, it is possible to give a state in a reusable element a default value.

  1. Navigate to the reusable element (or click on the text that says “This element is a reusable element, click here to…”, it is in the second screenshots in your initial post).

  2. Go to details for the reusable element → element inspector, there you can set the default value.

chrome_WGEYHdfm0K

Additionally you can use reusable element properties.

Hi,

Thanks for that. However it’s not quite what I mean to achieve. What you suggested would be a shortcut to editing the re-usable element from a page using this re-usable element.

However, what I would like to achieve is to set the state of this element’s instance for this page. i.e. for page A, reusable element’s Sign Up state would be YES and for page B, reusable element’s Sign Up state would be NO.

Ah, use properties for that, my previous post contains the link to the docs.

There are 2 ways to send data to reusable elements.

  1. Reusable Element properties
  2. Trigger a custom event from a reusable element (send data to the event’s properties)

The simplest way for your use case is method 2.

  • Create a Custom Event in your RE.
  • Define the necessary properties.
  • Action will set states to values of the Custom Event’s properties.

Then run the Custom Event from whichever page.

Right so the only way is via the workflow tab.

Yes, because setting a state is an action.

If you’re looking for dynamic data then you need to use properties.

No, as mentioned before you probably should use a property in this case:

image

Note: When field optional is yes you can give it a default value & you can set the value on the page where you use the reusable. When you uncheck optional and you do not set a value on the page where you use the reusable it will even trigger an error/issue.

Now when you drop the reusable on a page, you can set the value for property:

This was what I was looking for! Thanks.