Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There,
I have the following issue shown in the image below
In the script or table i would like to copy the errorMsg to all lines where the Purchase Order Number matches.
I am struggling with getting a peek function working but i think this is the best approach. Can anyone assist please?
Thank you
Hi @Daniel77 !
Did some testing and managed to achieve it using Peek() Function, see Example:
If(len(ErrorMsg)<1, Peek(ErrorMsg),ErrorMsg) as ErrorMsg,
Here I used "Len" to find out if the value is empty (Since it's not Null in your case), and after that used Peek in the "ErrorMsg" Field, and here is the result:
Can you try this and let me know if it helped ?
-Zapparoli
Check my Youtube Channel for more Qlik Content
https://www.youtube.com/@ZappaAnalytics
Hi @Daniel77 !
Did some testing and managed to achieve it using Peek() Function, see Example:
If(len(ErrorMsg)<1, Peek(ErrorMsg),ErrorMsg) as ErrorMsg,
Here I used "Len" to find out if the value is empty (Since it's not Null in your case), and after that used Peek in the "ErrorMsg" Field, and here is the result:
Can you try this and let me know if it helped ?
-Zapparoli
Check my Youtube Channel for more Qlik Content
https://www.youtube.com/@ZappaAnalytics
Thanks so much for the reply Zapparoli,
I actuall managed to resolve this with the following:
If( Len(Trim(ErrorMsg)),ErrorMsg, Peek(ErrorMsg2) ) as ErrorMsg2,
But your method worked too. thank you, I'll mark yours as the solution, thankyou
Hi @Daniel77
You can try using "IF" statement to achieve that
If(len(Purchase Order Number)>1 and isnull(errorMsg), 'itemref1not find. ', errorMsg)
Thanks,
That's another good option but i will be unsure of the errors at the point of load and new ones would need a change to the load script.
I appreciate your comment, thank you
Daniel