Hi,
Can someone please explain to me what is the use of the @ sign when referencing a variable in Workbench?
For example: /process_data/@myVar
Sometimes you need to use it, sometimes you don't, sometimes Workbench adds it for you but you shouldn't be using it, I'm confused.
If you have a link to the online help explaining this, that would be awesome.
Thanks
Nic
Solved! Go to Solution.
Views
Replies
Total Likes
The @ symbol is used to get the value of a node when it's a simple data type(string, int, long,etc).
At one point all variables get converted internally into an xml structure. That's why we can use xPath to get the value.
If you have a simple type, which can return only one value (string, int, long, etc), then you use the @ symbol.
If you have a complex object (for example FormsResult), then it depends which node you query. If you want to get the value of the action the xPath will be /process_data/test/object/@action. You get the @action, because it returns a string for that property.
If you want to get the list of attachents, then the xPath is /process_data/test/object/attachments. The attachments property doesn't contain a @ because it's not a simple type but a complex type (list of attachments).
Also the xml variable is considered a complex type.
I've never experienced a case when Workbench added the @ and I didn't need to use it. Let me know if you have a specific example.
Jasmin
Views
Replies
Total Likes
Are you using that schema in you pdf?
Jasmin
Views
Replies
Total Likes
in the XDP form, I created the data connection using that schema,
then I [Save As] and created the PDF form.
Views
Replies
Total Likes