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.
Get row that corresponds to selected variable
Get row that corresponds to selected variable
- Attachments
-
- TEST select.mrt
- (3.02 KiB) Downloaded 80 times
-
- select.png (103.46 KiB) Viewed 15829 times
-
- Posts: 7354
- Joined: Tue Mar 20, 2018 5:34 am
Re: Get row that corresponds to selected variable
Hello,
Sorry, we did not exactly understand your question. Could you explain your issue in more detail?
Thank you.
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
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".
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".
-
- Posts: 7354
- Joined: Tue Mar 20, 2018 5:34 am
Re: Get row that corresponds to selected variable
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.
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.