Hey @joefarrowsmith: Something important to know about List Shifter (and similar element plugins that have Actions) is that Actions can’t be fired at them before those elements are fully initialized on the page. And this happens after Bubble’s “Page Loaded” Event (very, very shortly after, but still after).
So, in List Shifter, we have an Event called “List Shifter Initialized/Updated”. This event fires:
- when the List Shifter is fully loaded in the page and its “List to Shift” and “Scalar” inputs have been retrieved and all outputs have been published (that is, as soon as List Shifter is “initialized”) and
- whenever the values in List to Shift or Scalar have changed (that is, whenever it is “updated”).
Further, there is an exposed state, “Initialized” which is a boolean (what Bubble calls a “yes/no”) that goes to true (“yes”) when List Shifter is fully initialized.
Examine the example project again, which I’ve modified to show how you might make use of these events. You’ll note that now, when the page loads, we see the values in LS 2’s custom list, without having to click the “Concatenate” button. (Though we can still Clear the custom list and click the button again to also trigger the concatenation.)
What I’ve done is moved the SET Custom List actions into their own Custom Event:
And then the Button workflow becomes:
And then we have two additional events for triggering the Concatenate event. “When LS1 Initialized/Updated” and “When LS2 Initialized/Updated”. Keep in mind that we do not know which List Shifter will be initialized first and additionally, we want both of them to be initialized before we do the concatenation. So they’re configured like this:
this says, “When LS 1 gets initialized or its contents change, do the concatenation, but Only when LS 2 is also initialized.”
Similarly, we have the converse for LS 2:
this says, “When LS 2 gets initialized or its contents change, do the concatenation, but Only when LS 1 is also initialized.”
Tiny pro-tip: For those “Only when…” conditions, we could have written
LS 1's Initialized is yes and
LS 2's Initialized is yes , but that’s redundant.