How do you get specific column values from Listview?

How display specific column values from Listview?
Here is my BLOCK:

Something missing :frowning:

I did Like this and it's working, I just wondering is it ok using like this or there is another way to make easier?

1. Calling back the raw data with a query

returns:

image

2. Convert this csv table to an AI2 list structure:

returns

image

3. Set the AI2 list to a listview

image

returns

image

Important to note that the list items displayed are strings, you lose the list formatting when you display a list of lists in a listview. A listview selection will return a string, including the rounded brackets.

4. Returning only (specific column values) the id and the full_name to the listview (and optionally removing the headers - index 1)

image

returns

image

5. Handling listview selections

On selection of a listview item, if you want to return a specific value, then it is easiest to return to the originating list and get the value using the listview's selection index. Here is shown how to return the name from the listview item selected

returns

image

image

I have used a local variable to set the listview elements. You can use a global variable instead.

3 Likes

@TIMAI2 thank you very much!
I've question?
Let's assume in GOtText
There are multiple
select list index 1, index2, index3...
I would like display selected list index2, So how I can display by using Listview1.Elements=>

In my case I did like this What do you think is it ok can I use or it's wrong ?

Well, did you try it ? Did it work for you ?

yes I did, it's working!