Change of custom state of a reuseable element will not show

My reuseable header has a custom state called “HeaderInfoText” and a textbox showing this state:

My page has a Workflow “When page is loaded” which sets this custom stat to a new value:

Problem:
After page load the text didn’t change

Where is my error?

What is the workflow to change the custom state after the page load?

When Page is loaded -> Set state HeaderInfoText of Header to “My Customer
(see screenshot above)

Ah I see. Sorry I misunderstood your question.
How is the value for “My Customer” getting updated?

My Customer” is a fixed string.

It also didn’t work if I use a function like:
Anmerkung 2020-03-30 122511

Ok, I think I see what the problem is.
The custom state is within your reusable element. But the action you are trying to use to set the custom state is on the page. The page cannot set the custom state of the reusable element. My guess is that you’ve created the custom state “HeaderInfotext” on both the page and the RE. If this is the case, then you’re trying to set the state of HeaderInfotext on the page, but are displaying the HeaderInfotext within the RE.

You can delete the “on page load” action as well as HeaderInfotext in the page.
Rather set the custom state within the RE.

You’re right: the custom state is in then reuseable header and I have to set it from every page (and no: I didn’t have another custom state in the page)

Examples:

  • On Page ‘customers’ the text in the header should be “My customers
  • On Page ‘products’ the text in the header should be “My products
  • On Page ‘services’ the text in the header should be “My services
  • and so on …

I found this Topic 58158 with nearly the same problem and the answer was, that we can solve it with a custom state of the reuseable element

Questions:
1.) Why can I select the custom state of my header in the workflow of the page in “Set state” if it doesn’t work?
2.) How can I change a text in a reuseable header from each page?

Damn! Sorry, you’re right. I just recreated the scenario and I do have access to the RE’s states from the page. So that was misleading feedback. Sorry!
Let me dig some more. Now I’m determined to help you solve this puzzle.

Ok, this is what I’ve been able to figure out…
I can indeed access the RE’s custom state from the page within workflow design. BUT, my workflow actions had no impact on the RE!

Instead, what I have been able to do is update the RE’s custom states from the within RE itself. So for example, from within the RE, use “on page load” to set the RE’s state to current user, and then display that on the RE and therefore on the page.

@SerPounce thank you for testing

So the result is, that I cannot change a text in a reuseable header from a page directly :frowning:

My workaround is now:

  • I created a field in the user table, named “LastPage”.
  • the textfield in the reuseable header dispays “Current User”-> field “LastPage
  • On each page I created a workflow “On page load” -> “Change Thing” -> “Current User”-> field “LastPage” to the individual pagename (i.e. “My product”)

It’s a little bit complicated but this works for me :slight_smile:

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