on 04-17-2020 12:49 PM
Hi Experts,
I am stuck in a issue, where it the Exists function is returning "true" it is working perfectly fine but if it is returning "false" then the else value passed(10 values in the queue) are suppressed & only the first value is produced as an output.
We need all the 10 values to be passed in the output. Please suggest any workaround.
Thanks,
Nidhi Srivastava
Hi All,
It didn't worked as expected. Tried a workaround - duplicate node and similar kind of mapping rules. Closing the blog.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nidhi,
If You want to pass all the ten vales, use remove context and splitbyvalue(eachvalue) before passing the values.
Also, try altering the contexts. Both should have the same contexts to pass the same number of values.
When I faced the similar issue, I tweaked contexts of the source field to resolve the issue.
Regards,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavan,
Thanks for your suggestion, but remove context along with split by each value is not working(already tried).I played around with context and nothing is working in my case.
What I understand, since the exists is passing 1 FALSE, so the first value is being considered and rest all suppressed.
Let me know if any further suggestion.
Thanks,
Nidhi Srivastava
Hi Nidhi,
Yes, since the exists is passing 1 false you are facing this issue. So you need to have the same context of both input and else fields.
Below screenshots might help, I resolved the same issue recently in one of my requirements.
Before changing contexts and adding splitbyvalue:
After changing contexts and adding splitbyvalue:
Regards,
Pavan
Hi Pavan,
The structure is like mentioned below.
Money with EXISTS is coming in InvoiceDetailItem -->UnitPrice -->Money
-<InvoiceDetailOrder>
<InvoiceDetailOrderInfo>
+<InvoiceDetailServiceItem XX>
+<InvoiceDetailServiceItem XX>
Money in ELSE is coming in InvoiceDetailServiceItem -->UnitPrice -->Money
-<InvoiceDetailOrder>
+<InvoiceDetailOrderInfo>
+<InvoiceDetailItem XX>
+<InvoiceDetailItem XX>
Any one node will only be coming either InvoiceDetailItem or InvoideDetailServiceItem.So, accordingly only one Money will be coming in the structure as per the node.
Please suggest.
Thanks,
Nidhi Srivastava
Hi Pavan,
This is not working, also I tried with the context but still the same result.
When I am trying with the useoneasmany - it is not working as generating false is again using if then else and the issue remains the same.At the end, only one false is getting generated.
Please suggest if some udf will help.
Thanks,
Nidhi Srivastava
Hi Nidhi,
In my case, it worked.
Can you try altering the mapping logic as below considering only one money field will be populated?
If InvoiceDetailItem exists, then pass the Money in If value, else {add one more if-condition} InvoiceDetailServiceItem exists then pass the Money in else value, else a constant empty value. You can play with context to generate the correct output.
If the above solution doesn't work, then you have to use UDF to generate the contexts.
Regards,
Pavan
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.