Page 1 of 1

Get row that corresponds to selected variable

Posted: Fri Mar 07, 2025 8:23 am
by jaqb
Hello,
I want to select a row from the "root" table that was selected by the user via the "days" variable (the key of this variable corresponds to the "intervalIndex "field in the "root" table). Then I want to get the "start" and "end" fields from this row and put them as a parameter of the HTTP request.
How can I do this? I've attached sample report and scheme with the result I want achieve.

Re: Get row that corresponds to selected variable

Posted: Fri Mar 07, 2025 5:35 pm
by Lech Kulikowski
Hello,

Sorry, we did not exactly understand your question. Could you explain your issue in more detail?

Thank you.

Re: Get row that corresponds to selected variable

Posted: Mon Mar 10, 2025 9:31 am
by jaqb
Yes, of course.
I get a list of available intervals from the server, where each interval has "start", "end", "intervalIndex" and "intervalType" fields (table "root" in the schema and the sample report). Then I want to display this list as options for the user to choose from, so I create a variable as a request from user, where each list item has the key "intervalIndex" and the label {start} " - " {end}. The user selects one item from the list and I want to get the start and end values ​​from the item they selected (for now, I only have access to the key value of the selected item, i.e. "intervalIndex".

Re: Get row that corresponds to selected variable

Posted: Tue Mar 11, 2025 10:07 am
by Lech Kulikowski
Hello,

In your case, you can use the Substring() function:
Start date - {DateTime.Parse(Substring(days.Label, 0, 16))}
End date - {DateTime.Parse(Substring(days.Label, 19, 35))}

Thank you.