Using scripted data-sets to retrieve single object

Mad1s0n
edited February 11, 2022 in Analytics #1
Hello,<br />
I just have a quick question about what is the proper way to retrieve a single object with a scripted dataset.<br />
I want to display information of an object in my report outside a table. Up to now, I used to get this object in a list and populate one row of my dataset by iterating through this list containing a single element in the fetch event handler.<br />
When I try to populate my dataset without an iteration with the following fetch method, nothing shows ont the report:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>row["patientIdent"] = consultation.getMember().getFullName();
row["membership"] = consultation.getWorkFlow().getMedicalEvent().getMembership();
row["demography"] = consultation.getMember().getNationality().getName();
return false;</pre>
<br />
Is using a list and iterating through the only way to go?