UPDATE 2: SOLVED
I finally figured out that I need to place my dynamic data into the parameter fields and then use the properties.param1
syntax in my script. Now the values are correct and the script runs without errors!
Here is the final code:
bubble_fn_RemoveFromSortedList(
{
output1: properties.param1,
output2: properties.param2
} );
UPDATE:
I managed to send the correct data now. I needed to make the data type Text for output1
and remove the quotes when I name the unique ID. I think because it was already a string it did not need the quotes.
But now the Javascript to Bubble Event is no longer firing! As you can see from my screenshots below, the event is triggered and I can examine my variables.
Now, as I step through, that event no longer triggers. Any ideas?
I think I have output1
correct now because the data types match and there were no errors apparent. But I am getting this server error now:
I’m trying to trigger an event on the page from a reusable element. I’m getting close, but one of my parameters is always empty. Here is what I have:
Run Javascript: (in reusable element)
output2
is working fine.
output1
I want to pass the Thing (data type ActionBlock) to my event, but if I understand correctly, I have to pass the ID which is text. I have defined the data type for output1
as both text and ActionBlock with the same result. The value is empty (see below for more detail).
When I add a breakpoint in the debugger, I can see that Run Javascript has the correct values to pass in the function:
But when it gets to the Javascript to Bubble Event, output1
is empty and output2
has the correct value (I use the number of the sortOrder to find the option in my Option Set that matches and then grab the name. That’s why they look different. I can just use the name because they are not unique):
Here are the rest of the settings on the main page:
Javascript to Bubble element settings: (on main page)
Javascript to Bubble Event: (on main page)
Does anyone see anything I am doing wrong? How am I supposed to pass a custom data type as a parameter so I can use it in an event (and pass it to another custom event on my main page)?
Thank you!