0
Keep rID information in a JSON?
I have created a JSON object
let t := this;
let xPart := unique(Results.Partners);
let xNewData := xPart.{
Name: Horse.'Horse Name',
rID: Horse.Id,
Atm: switch t.League do
case 2:
sum(Results[Year_calc = t.year_calc and League = t.League and 'Round Type' = 1].attempted)
default:
sum(Results[Year_calc = t.year_calc and League = t.League].attempted)
end,
}
There is much more, thus the reason for creating the JSON. Then I use the JSON data to create a HTML table.
I need to store rID information so I can use ui.popupRecord(). But of course JSON data is [any].
Is there a way to make this work?
11 replies
-
Hi Fred.
Try passing the Horse.Id with raw() or string() which include the table reference. So ui.popupRecord() should work!
Fabio -
Ok I got this to work:
let tbleBody := xNewData.--- <tr onclick=ui.popupRecord('{ dID }','{ rID }')> <td>{ Name }</td> <td></td> <td></td> </tr> ---;
Why it didn't before I don't know. There was something else going wrong as it added space at the top of the table when it didn't before, but then I retyped everything between the three dashes and now it works.
Thanks for helping me out.
Content aside
- Status Answered
- 2 wk agoLast active
- 11Replies
- 68Views
-
3
Following