I have a property called SelectedDiscountOptions, configured as a Data Reference (List of Records). It is sourced from a Data Page and used in a partial view to display the selected records in read-only mode. The UI control is configured as a multi-select field.
Configuration:
Mode: Read-only
Display as: Simple table
Columns:
pxListSubscript (for Option No)
Reference name
However, the Option No column is not displaying any values when I use pxListSubscript.
Since this is rendered as a read-only Data Reference (not a Repeating Dynamic Layout bound to a Page List), pxListSubscript seems not to be resolving in this context.
My Questions:
Is pxListSubscript supported in a read-only Data Reference rendered as a Simple Table?
If not, is there any supported workaround to display row numbers in this configuration?
Would the only option be to switch to a Repeating Dynamic Layout backed by a Page List to achieve this?
I have replicated the above configuration mentioned by you and indeed pxListSubscript does not seem to work in pagelist on the UI.
Tried the below approaches in v25.1.1 and v25.1.2
Used the @baseclass.pxListSubscript and declare expression for the same property directly - Din’t work
Save as both the pxListSubscript property and declare expression into data class - Din’t work
Created a property RecordNumber of Integer type and a declare expression for it that uses the same function @pxGetListSubscript(tools) which was used in OOTB - Worked
Created a property RowNumber of Text type and a declare expression for it and using the same function @pxGetListSubscript(tools) which was used in OOTB - Worked
Also when i displayed the data reference in Table, Simple Table, Cards layout i see the same above mentioned behaviour.
So it seems to me that the pxListSubscript property has an issue when we use it for list to display the item number. You may want to raise an INC to pega to hear their thoughts on this one.
Finally, to answer your questions
Is pxListSubscript supported in a read-only Data Reference rendered as a Simple Table ? Seems like its not supported as of now
If not, is there any supported workaround to display row numbers in this configuration ? You can create your own property for the data class and use the same OOTB function in declare expression to get the row number
Would the only option be to switch to a Repeating Dynamic Layout backed by a Page List to achieve this ? If you have your own property to get the row number, then you can continue with your table layout without any issue. No need to switch the layouts.
Interesting case and also good to know the solution for this. What i dont understand is what is the business value for the user: why does the user need to see the option number the record had had during selection?