Hi All,
While pratcing Invoke method, want to do substring method.
But where I am doing wrong, not able to find out.

Thank you
Hi All,
While pratcing Invoke method, want to do substring method.
But where I am doing wrong, not able to find out.

Thank you
we can use the substring method directly within an Assign Activity
You can also explore within the immediate panel
For learning purpose can use the invoke method, But have to be strict on the method signature (allowed parameters)
Want to use Invoke method, how need to configure I am looking
tell us your input string value and the expected output from substring and we will guide
As A preview:
When from a variable called strText with value “Hello RPA” we want to get back the ello we would do:
which is similar to:

Thank you, in the parameter I was providing wrong.
Got it
I think your example shows a little misunderstanding about when to use Invoke Method. Some methods (like substring) return a value, so you just use them in an Assign:
Assign newValue = oldValue.Substring(1,2)
If your oldValue is “Hello World” then oldValue.Substring(1,2) returns the value “He”.
The usefulness of Invoke Method is for methods that do not return a value, they just perform an operation. One good example is removing a key from a dictionary, this would be the VB expression:
myDict.Remove(“Key To Remove”)
But this expression does not return a value, it just removes the key. So you can’t use it in an Assign. For this you use Invoke Method:
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.