I have a scenario where I have two variables (of different schemas, but hold content relating to the same object) and I need those values from Variable1 that are not there in Variable2
Here,
One Variable holds existing users and the other one holds users from a flat file
Here are the two variables
Users from flat file input:
<ReadUsersResponse>
<tns:User>
<tns:Name>aa1</tns:Name>
<tns:EmailAddress>bb1</tns:EmailAddress>
</tns:User>
<tns:User>
<tns:Name>aa2</tns:Name>
<tns:EmailAddress>bb2</tns:EmailAddress>
</tns:User>
</ReadUsersResponse>
Existing Users:
<ReadProjectCodesResponse>
<ProjectCode>
<CodeValue>aa3</CodeValue>
<Description>bb3</Description>
<ObjectId>1418</ObjectId>
</ProjectCode>
<ProjectCode>
<CodeValue>aa1</CodeValue>
<Description>bb1</Description>
<ObjectId>1419</ObjectId>
</ProjectCode>
</ReadProjectCodesResponse>
If you observe, Name in Variable1 corresponds to CodeValue in Variable2. Similarly, Email in Variable1 to Description in Variable2.
I need to produce a list of the users that do not exist in variable2, meaning
- Variable1 - Variable2
(ie. only
aa2as it is not existing)
And transform the result into a different format:
<tns:CreateActivityCodes>
<tns:ActivityCode>
<tns:CodeTypeObjectId>SomeConstantNumber(1280)</tns:CodeTypeObjectId>
<tns:CodeValue>aa2</tns:CodeValue>
<tns:Description>bb2</tns:Description>
</tns:ActivityCode>
</tns:CreateActivityCodes>
I have been doing some work on this, but could not figure out a solution. Would someone provide me a solution?
CodeTypeObjectIdcome from? The first file doesn't have anObjectId.