on 2023 Mar 17 4:13 PM
Hi
I have posted an attachment into SuccessFactors and I receive the below response:
now, to assign the attachment to a custom Mdf object, I would like to store the attachmentId as a property in a content modifier, however, the xml response I receive is actually unworkable, mostly because the highest level node has the namespacing with all those special characters, so navigation is not possible from that point
also, the field attachmentId is actually as below as well (with special characters)
<d:attachmentId m:type="Edm.Int64">2414</d:attachmentId>
how can I achieve this?
any help would be really appreciated
thank you
Request clarification before answering.
Hi Pedro
There's nothing wrong with your XML. And yes, your issue probably has to do with namespaces. In order to use them in an XPath expression, you need to declare them first. Go to your iflow's Runtime Configuration tab (click the iflow canvas, i.e. the background) and add the following to the Namespace Mapping field:
xmlns:n=http://www.w3.org/2005/Atom;xmlns:m=http://schemas.microsoft.com/ado/2007/08/dataservices/metadata;xmlns:d=http://schemas.microsoft.com/ado/2007/08/dataservices
It should look like this when you're done:
Now create a property with Source Type set to XPath and the value set to:
/n:entry/n:content/m:properties/d:attachmentId
Like this:
After this Content Modifier step, the property contains the correct attachment ID.
Regards,
Morten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, you are an absolute star as always, the solution you provided indeed worked and it made me feel quite silly as I had tried a similar approach, but I had the content modifier syntax written incorrectly, so I dismissed it completely.
thank you very much for your help
Best Regards
Pedro Costa
User | Count |
---|---|
71 | |
21 | |
9 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.