Page 1 of 1

Displaying Dynamic and Static Data

Posted: April 9th, 2023, 9:38 pm
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

Re: Displaying Dynamic and Static Data

Posted: April 10th, 2023, 7:24 am
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