Using .name() to display coded values doesn't work...
Essentials 4.5.1
Viewer 2.6.1
The Reporting help (as well as several posts in the forum) says you append .name() to the DataField property to show the value for a field with a coded value domain. This isn't working for me and the value ont he report is left blank.
However there might be a couple things causing a wrinkle with this, so I wanted to confirm:
1) The report is being built in a workflow, so maybe that works differently than if the report is created directly from the layer.
2) The field with the coded value domain is actually in a subreport.
This isn't a big problem in all honesty. I know I can get the values I need using the GetCodedValueDomain activity and work it from there. I'm more looking for confirmation that one of the above options is why .name() isn't working in my case.
Thanks!
0
-
Hi Emily,
Your suspicions are correct. When you assemble a DataSet to run a report from a workflow, the code that renders the report does not know that some of the columns are actually coded values that would need expansion into their display values.
When you run a report from Essentials, it does know about that, so Essentials will add the .name() fields at run-time.
In your workflow the best approach is to use the GetCodedValueDomain activity and fill in the values explicitly in your DataTable and DataSet object(s).
Regards,
-Malcolm0 -
Thanks for the confirmation Malcolm! 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare