How to unwrap or get values from a Wpp Object from "activity" | Community
Skip to main content
Level 2
March 23, 2022
Question

How to unwrap or get values from a Wpp Object from "activity"

  • March 23, 2022
  • 1 reply
  • 1772 views

Hi, I have a element of a "link" type which I am using on an input form. In my custom JS activity, how do I get the values of selected linked schema (options:dimentions). I can get to other values in JS using activity.label etc. but when I do activity.dimension I get at [Object WppObject] and I tried to use "for each" etc. but I cannot get to the selected schema values "dimensions". Does anyone know, how to get to the values in Wpp Object?

Schema:
<element label="Dimensions" name="dimension" target="options:dimensions" type="link"/>

Form:
<input xpath="dimension"/>

JS:
activity.dimension (Wpp Object)

Thanks!
/Wiki

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

August 10, 2023

Hi @wiki, I'm facing the same problem currently and I wonder if you found a solution for parsing an wpp object?
I'm also trying to create custom activity that let's user pick values from a schema.
Thanks in advance!

wikiAuthor
Level 2
August 10, 2023

Hi @rasmusp39956127 , I didn't find the solution to parse a wpp object; but I managed to implement in another way; I created the link and then some "temp variables" where on the form, I then saved the values from user inputs (in those variables) and read those variables then in the activity.

 

Regards
Wiki

August 10, 2023

Thanks for your reply and great to hear you found an alternative solution!
I'd very much appreciate a generic example of the steps you performed to achieve the desired end result, if possible?
Many thanks!