One of common tasks in In-Portal is to display data from database. However we also need to account for case, when no data was selected and different text needs to be shown to user. This can be achieved using following template code:
From the above code it's obvious that doing 2 DB queries isn't necessary because selected record count (0 or more) is enough to determine if there is enough data to be displayed.
- in "
kDBList::GetSelectedCount"add call to "
kDBList::Query"method if list wasn't queried (like it's done in "
- create "
kDBTagProcessor::SelectedRecords"tag, that will call above method
- add "
selected"type to "
kDBTagProcessor::GridInfo"tag to allow retrieval of selected record count