Concat Method Query Issue

in for each i am getting values like that

‘1234567899’
‘456123154688’
‘45648456456’
‘4564’
‘1111235’
‘546489894544’

All i need to do is whatever comes from for each i need to concatenate with ‘120.’ + value but after ‘120.’ it has 11 digits. If the length of a value less than 11 digits it should add ‘0’ at the beginning. For example ;

‘120.01234567899’
‘120.456123154688’
‘120.45648456456’
‘120.00000004564’
‘120.00001111235’
‘120.54648989454’

How can i make it with in MSSQL query?? :robot:

I tried the following code but it didn’t work like i want ;

CONCAT(‘120.’, RIGHT(REPLICATE(‘0’, 11) + ‘{{$node[“ForEach”][“json”][“vat”]}}’, 11))

dynamicvalue = {{$node[“ForEach”][“json”][“vat”]}}

HELP PLEASE !

Been a long time since I’ve done SQL but you can just do it with vb.net expressions which is the preferred method of string manipulation in UiPath.

Assign newValue = "120." + currentItem.PadLeft(8,"0"c)

Then use newValue in your SQL query.

1 Like

Thanks but that was not the solution. I have done it with different kinds of method

In order to help others who may have a similar question, you should post your solution.