Displaying Dynamic and Static Data

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
Joe.Wells
Posts: 15
Joined: March 22nd, 2023, 8:45 pm
Contact:

Displaying Dynamic and Static Data

Unread post by Joe.Wells »

In a label, is it possible to concatenate static and dynamic data?

For example, I would like to present the number of records like this -

"Total Records Returned: XXX"

Where "XXX" is "WorkData/AddOnListCtl/Info/Result/NoOfRecords".

Ideally, I would like to be able to do something like this in the Dynamic Value box of the label -

"Total Records Returned: " || WorkData/AddOnListCtl/Info/Result/NoOfRecords

Is this possible? What would the proper syntax be?

Alternatively,I tried adding a two column table and placing the text description in the first column and NoOfRecords in the second. This worked and I was able to manipulate it somewhat......but it simply did not look as nice as I want it to.

Also, how would you determine the number of records being displayed?

It would look even nicer to show -

"Show records 1-YYY of XXX".

I searched documentation but did not find answers to these specific questions.

Thanks,

Joe
word count: 157

Tags:
SumanPrasad
Posts: 88
Joined: August 26th, 2021, 5:21 pm
Contact:

Re: Displaying Dynamic and Static Data

Unread post by SumanPrasad »

Joe,
For "Total Records Returned: XXX", you must construct it in Model or Controller first before putting it in a field as dynamic value. At the view level, you can either use static or dynamic values. View cannot use any logic to put values together and must use Model.
For "Show records 1-YYY of XXX", you can get YYY from Model:WD/Paging/NoOfRecords. But we do not have XXX by default. However, our inquire service or RQ server can return XXX (total number of records) but you must turn the flag on at the service level for this. Reason we do not do this as default as count(*) on a query can have major performance penalty given a query.
Once you have it service level using the flag, you can then put it in a new variable in 'Paging' service and then display it as dynamic value anywhere you want.
Thanks,
Suman
word count: 154
Post Reply