206
Views
3
Comments
Solved
How to choose the second row result in the list?
Question

Hello,


Please help.

I need to show in the expression only the second item in the List (Preparation).

I mean, for example, there is a preparation with the list that contains five emails. I want to show to the user only the second one out of the list. How can I do it in the Expression value property?

GetEmails.List.Current.Emails.Name [1] ??


thanks!

2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Mikhail,

Hope you're doing well.

A list with N elements goes from index 0 (first element of the list) to index N - 1 (last element of the list).

So, the second element will be index 1.


You should use this expression:

GetEmails.List[1].Emails.Name


Kind regards,

Rui Barradas

2021-04-09 11-42-43
assif_tiger
 
MVP

Hi Mikhail Matkovsky 

 Use it this way:

GetEmails.List[2].Emails.Name

  Like for User entity I did:

GetUsers.List[1].User.Name


- Assif

2020-05-07 18-53-00
Rui Barradas
 
MVP
Solution

Hello Mikhail,

Hope you're doing well.

A list with N elements goes from index 0 (first element of the list) to index N - 1 (last element of the list).

So, the second element will be index 1.


You should use this expression:

GetEmails.List[1].Emails.Name


Kind regards,

Rui Barradas

2023-03-09 07-10-59
Vipasha Sharma

Hi Mikhail,

The best way to do so is use "List Filter" in preparation and put the condition to fetch only 2nd row value please see the snap shot below and follow the steps for better understanding:

Step 1: Put "List Filter" just below the aggregate. 

Step 3: Set source as your main aggregate  and condition as "

GetMovieById.List.CurrentRowNumber = 1

", here 1 is because list returned in form of array

Step 2: Bind your expression value with the output of the "List Filter" (use in preparation).

Hope this will work for you

Regards,

Vipasha


image.PNG
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.