Hi All,
I have to get all characters of text="1234233" in List .. In short i have to convert text value to list of values.
Is it possible with single function ?
Thanks & Regards
DM Singh
Hello DM,As I understand it, you want to transform the string "123423" in a list of values, like this:List of values:value 1 = 1value 2 = 2value 3 = 3value 4 = 4value 5 = 2value 6 = 3
A possible way to do that is using the system 'ListAppend' action combined with the 'SubStr' function (here). First you need to create the variable that will be your List of Values. Then, you receive a string with 6 characters and you want to separate them one by one (using the 'SubStr' function), storing each one in the List of values using the 'ListAppend' action. You can encapsulate all this "flow" in a user action and call it whenever you need it.
Best Regards
Paulo Zacarias wrote:
Hi Paulo, Could you possible to post screen shot of logic , I understood but problem with how to implement . It will be helpful for me . Thank you .
Hi DM,
you can check out the length of the string and then make a loop with incremental index values and append it to list.
you are done :)
Debasis Sahoo wrote:
Can you provide me an OML file .. it will be helpful for me
Hi Debasis,
Idea is good, but how you will read each character before append it to the list.
Sachin
Sachin Mahawar wrote:
Hi Sachin,
you have got the length of the string, make a counter variable, loop until the length of the string is reached. inside the loop use the substr() function and pass on the value of the current loop index and 1 to get the single character every time. Now append it to list. That' so simple :)
Thanks for the reply.
So the final solution is to read each char using substring function ... Am i right ?
Thanks Paulo
Hi,
You can also use this extension. https://www.outsystems.com/forge/component/2524/text-v2/
Regards,
Marcelo
Thanks Debasis, Now I got it.
I know it was so simple but even I wasn't recalling it.
Thanks
No worries .. It happens with me as well :)
DM wrote:
Hi DM, Have you find out solution for your query or still open now?
Hi Nikhil,
You can use this component which has this action StringSplitIntoChars.
Btw to get help is always better to create a new post instead of revive a old post.