Actionability

One thing you may have noticed about our report is that it is not actionable ... unlike Views, where we could check rows and execute actions on them, the Report is in a read-only mode. By configuring a few key properties you can convert your report to an Actionable report and enjoy the same features.

Any actionable report must first select the surrogate ID of the model to be updated. Let's add SysBookId as a hidden field. We already have it in our SQL, so we merely need to add the CustomRetrievalField:

<CustomRetrievalField>
<FieldRef levelType="ZBKS.Book" category="PDF">
<FieldName>SysBookId</FieldName>
</FieldRef>
<Hidden>true</Hidden>
<Type>LONG</Type>
<SimpleMapping sqlName="SYS_BOOK_ID"/>
</CustomRetrievalField>

Next we need to mark the report as Actionable. Add the ActionDef tag right after the SqlDef tag, indicating that the PrimaryModelLevelType is ZBKS.Book:

</SqlDef>
<ActionDef>
<PrimaryModelLevelType>ZBKS.Book</PrimaryModelLevelType>
</ActionDef>
<Filters>

Once these changes are in place, submit your Report. You should find that now there are checkboxes available for each row and that we can select an Action based on state and permissions:

images/download/attachments/144836787/checkboxes-version-1-modificationdate-1678372455000-api-v2.jpg

Choosing an action will pop up the same Action Screen (List) that you would see on a view page:

images/download/attachments/144836787/actionScreen-version-1-modificationdate-1678372455000-api-v2.jpg

Please see the "Report Schema" section of the Report topic in the SDK User's Guide for more information.