Unable to use type into activity with keystorke

I am trying to use Type into activity with the following.
Value is a variable which is of generic type
I am adding enter keystorke at the end.

value+ “[k(enter)]”

It is thorwing me an error cannot add system.int32 to system.integer. I can understand why it is throwing and error. But how to eliminate that ?
I mean how to use a generic value with keystoke.
Converting value to integer is not an option for me. Please suggest.

image

Hi @Pavan_Gunda

try like this buddy
value.ToString + "[K(enter)]"

Cheers

As i said, Converting value to string is not an option for me. Because value is a integer data type.

1 Like

yes of course let it be integer value
but we can use only strings in type into activity buddy
So we need to convert to string from being with any datatype


Cheers @Pavan_Gunda

Thanks @Palaniyappan for prompt response.
Lets say variable1 has value 00001234. It is typing as 1234 if we convert into string. Hence, I dont want it to convert variable1 into string variable.

So, I can only use string values inside type into activity ?

for this we can mention like this
value.ToString.PadLeft(8, CChar(“0”))

then

yes buddy only strings

Cheers @Pavan_Gunda

2 Likes

Do you mind explaining this syntax?

1 Like

@nlee1131

If length of the string “value” is less than 8, the method will add the character ‘0’ N times to sum up the length of the “value” to 8.

Will add as prefix if the method is PadLeft
Will add as suffix for PadRight

Eg: input string = “hello”

input_string.padLeft(10,cchar(“x”))

output will be - xxxxxhello

input_string.padRight(10,cchar(“x”))

output will be - helloxxxxx

1 Like

Thanks!

1 Like

@Pavan_Gunda

INT datatype will not consider leading zeros as per .net standard. The method (toString) is not the one which strips leading zeros. @Palaniyappan solution will resolve your case i guess.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.