uiStijn
(Stijn Ekkelboom)
April 4, 2023, 12:45pm
1
Hello everyone,
I’m attempting to change the value of 18 items in the “in_Transaction” variable to 0. This change is necessary when the string in the “BAS04, BAS05, BAS06, BAS11 etc.” field of the “in_TransactionItem” variable equals "€ - ". The reason for this change is because the current expression, which converts the value of the “BAS04” field to a numeric value, cannot handle the "€ - " string. My current expression that throws an error:
If(in_TransactionItem.SpecificContent(“BAS04”).ToString.Trim.Equals(" - “), “0”, CDbl(in_TransactionItem.SpecificContent(“BAS04”).ToString.Replace(“€”,”").Trim).ToString(“N2”, system.Globalization.CultureInfo.CreateSpecificCulture(“de-DE”)))
Thanks in adance,
Stijn
Try this instead
If(in_TransactionItem.SpecificContent(“BAS04”).ToString.Trim.Equals(“€ -“), “0”, CDbl(in_TransactionItem.SpecificContent(“BAS04”).ToString.Replace(“€”,””).Trim).ToString(“N2”, system.Globalization.CultureInfo.CreateSpecificCulture(“de-DE”)))
uiStijn
(Stijn Ekkelboom)
April 4, 2023, 12:55pm
3
@sven.wullum1
Hey Sven,
Thank you for the fast reaction. It still gives me an exception.
sven.wullum1:
If(in_TransactionItem.SpecificContent(“BAS04”).ToString.Trim.Equals(“€ -“), “0”, CDbl(in_TransactionItem.SpecificContent(“BAS04”).ToString.Replace(“€”,””).Trim).ToString(“N2”, system.Globalization.CultureInfo.CreateSpecificCulture(“de-DE”)))
Hi @uiStijn ,
Are you trying to change the values in the Queue Data ? Or just the Transaction Item that you get ?
I believe we will not be able to modify the values in the Queue Data once posted/added. You could check the below post on the discussion on the same.
Hi @Athulya_S_Chandran ,
There are two things I love about Blue Prism.
Ability to modify queue item data whenever there is a need for it, be it troubleshooting or debugging
Process logs which can trace easily where the exception occurred
Your question relates to Point 1. Sadly, as many have pointed out already, you cannot change the item when the item is picked from the queue i.e., the item is in-progress in UiPath
To achieve what you want simply set a max retry value when you cr…
Also, Let us know what is present in the Left Hand Side of the Assign statement.
uiStijn
(Stijn Ekkelboom)
April 4, 2023, 1:11pm
5
Hey Superman,
I’m trying to change the in_Transactionitem after i get it out of the Queue.
Current multiple assign situation:
@uiStijn ,
Could you try using that Assign Expression in a Normal Assign activity and check if it gives the same error or a different error ?
1 Like
uiStijn
(Stijn Ekkelboom)
April 4, 2023, 1:39pm
7
Hey Superman, i changed the expression from String.equal to String.replace and got it to work:
CDbl(in_TransactionItem.SpecificContent(“BAS04”).ToString().Replace(“€ -”, “0”).Replace(“€”,“”).Trim()).ToString(“N2”, System.Globalization.CultureInfo.CreateSpecificCulture(“de-DE”))
2 Likes
system
(system)
Closed
April 7, 2023, 1:39pm
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.