String_Split display each record in the database as split value

Hi everybody,

I am a newbie in outsystems. I would like to ask something about string_split function, i am little confused in using it.

I am only getting one record, i cannot display all the records as split value, it only return one record value. I am retrieving the value of the Tour Highlights field, here's how it looks:


 I am only getting the last value. How could i be able to get all the value of the record and display it as split? I've read some post, that it is need to be done in logic, how can i do that? i'm sorry i'm not that familiar with outsystems yet. Can someone help me do it? better if you could give an example. 


Thank You. I hope someone could help.

Can you quickly post a snip of your current logic here. would be easier to suggest a solution on the same lines instead of working out form scratch.  

Tushar Panpaliya wrote:

Can you quickly post a snip of your current logic here. would be easier to suggest a solution on the same lines instead of working out form scratch.  

Hi Tushar,

This is how i do it.



laurence De Ocampo wrote:

Tushar Panpaliya wrote:

Can you quickly post a snip of your current logic here. would be easier to suggest a solution on the same lines instead of working out form scratch.  

Hi Tushar,

This is how i do it.




Looks like you are just splitting the current record (first in this case). You'll have to iterate/loop through the GetTours list and then split each of those. One simple approach to try this out can be , have parent list record with source as getTours.List and then in each list Item the current logic. What widgets to use would Would depend on how you want to display the data.  

Tushar Panpaliya wrote:

laurence De Ocampo wrote:

Tushar Panpaliya wrote:

Can you quickly post a snip of your current logic here. would be easier to suggest a solution on the same lines instead of working out form scratch.  

Hi Tushar,

This is how i do it.




Looks like you are just splitting the current record (first in this case). You'll have to iterate/loop through the GetTours list and then split each of those. One simple approach to try this out can be , have parent list record with source as getTours.List and then in each list Item the current logic. What widgets to use would Would depend on how you want to display the data.  

Hi Tushar,

 I've tried your suggestion but it has an error :

 

Thank You! How could i solve this?  

Can you attach the oml for this. Will look into it and revert.

Tushar Panpaliya wrote:

Can you attach the oml for this. Will look into it and revert.

Hi Tushar ,

  This is the oml.


laurence De Ocampo wrote:

Hi everybody,

I am a newbie in outsystems. I would like to ask something about string_split function, i am little confused in using it.

I am only getting one record, i cannot display all the records as split value, it only return one record value. I am retrieving the value of the Tour Highlights field, here's how it looks:


 I am only getting the last value. How could i be able to get all the value of the record and display it as split? I've read some post, that it is need to be done in logic, how can i do that? i'm sorry i'm not that familiar with outsystems yet. Can someone help me do it? better if you could give an example. 


Thank You. I hope someone could help.

Hi,

String_Split must be used as an action either in screen action or in any other action since it returns a list of text, which you may want to iterate or perform some logic based on that. Here you are using String_Split at the screen as the expression which is not correct and will not show the desired result as you want to see. 

Is it really require to have value in a database like you are keeping(a/b/c/d) ?, I don't know what use case you are trying to build maybe you are trying to explore the string_split function.


Thanks,

Sachin 

Solution

laurence De Ocampo wrote:

Tushar Panpaliya wrote:

Can you attach the oml for this. Will look into it and revert.

Hi Tushar ,

  This is the oml.


Hi laurence,

You are using String_Split function inside expression and expression is accept only text type data and string split return Text record list thats why you are getting this error .

Do One thing create a WebBlock and pass this list current  value in webblock as input parameter.

Use string split in web block and show this is here and use this WB in list record .

Find attched demo oml hope this will help you.


Regards

Rahul Sahu


Solution

Sachin Mahawar wrote:

laurence De Ocampo wrote:

Hi everybody,

I am a newbie in outsystems. I would like to ask something about string_split function, i am little confused in using it.

I am only getting one record, i cannot display all the records as split value, it only return one record value. I am retrieving the value of the Tour Highlights field, here's how it looks:


 I am only getting the last value. How could i be able to get all the value of the record and display it as split? I've read some post, that it is need to be done in logic, how can i do that? i'm sorry i'm not that familiar with outsystems yet. Can someone help me do it? better if you could give an example. 


Thank You. I hope someone could help.

Hi,

String_Split must be used as an action either in screen action or in any other action since it returns a list of text, which you may want to iterate or perform some logic based on that. Here you are using String_Split at the screen as the expression which is not correct and will not show the desired result as you want to see. 

Is it really require to have value in a database like you are keeping(a/b/c/d) ?, I don't know what use case you are trying to build maybe you are trying to explore the string_split function.


Thanks,

Sachin 


Hi Sachin,

The data it contains where just for testing purposes, that's not the actual data i'll be using, i'm just trying to make it work first before i implement it with the actual data.


Thank You!

Rahul Sahu wrote:

laurence De Ocampo wrote:

Tushar Panpaliya wrote:

Can you attach the oml for this. Will look into it and revert.

Hi Tushar ,

  This is the oml.


Hi laurence,

You are using String_Split function inside expression and expression is accept only text type data and string split return Text record list thats why you are getting this error .

Do One thing create a WebBlock and pass this list current  value in webblock as input parameter.

Use string split in web block and show this is here and use this WB in list record .

Find attched demo oml hope this will help you.


Regards

Rahul Sahu



Hi Rahul,

Thank you very much for replying, i will look into the oml you gave and study it. thank you for your time and effort, really appreciate it.


- Laurence

Rahul Sahu wrote:

laurence De Ocampo wrote:

Tushar Panpaliya wrote:

Can you attach the oml for this. Will look into it and revert.

Hi Tushar ,

  This is the oml.


Hi laurence,

You are using String_Split function inside expression and expression is accept only text type data and string split return Text record list thats why you are getting this error .

Do One thing create a WebBlock and pass this list current  value in webblock as input parameter.

Use string split in web block and show this is here and use this WB in list record .

Find attched demo oml hope this will help you.


Regards

Rahul Sahu



Hi Rahul, 

I've tried your solution and it works! thanks to you! But one last thing, what if i just want to display the split value of a specific record? based on the id . I'm still a bit confused in this part.


Thank You!

-Laurence

Hi Laurence,

You need to filter on aggreagte based on ID . aggregate return record based on ID .


Regards

Rahul Sahu

Rahul Sahu wrote:

Hi Laurence,

You need to filter on aggreagte based on ID . aggregate return record based on ID .


Regards

Rahul Sahu

Hi Rahul,

Got it thanks!


Welcome Laurence,

Glad to help you.


Regards

Rahul Sahu