I have created an agent to print out all the values from all the Columns using an entry collection. The view is a categorized view with the first column being categorized from the Department field. For each entry my code goes like this:
OnError Resume Next
forall colval in entry.ColumnValues
print colval
End forall
Again, that first column value comes from a multi-value field, called Department, which in many cases has multiple values in it. For those entries with multiple values in it the print returns nothing for that column. I have, however, put together a check that actually implodes the column value to see if it then is a valid value, and that works. It returns something like this for those multi-value Department fields:
“Nursing Dept:Admin Dept:Emer Dept”
So when it’s printing out each entry the basic values look something like this:
Admin Dept
Nursing Dept:Admin Dept:Emer Dept
Beta Dept
Cappa Dept
Emer Dept
Nursing Dept:Admin Dept:Emer Dept
Emer Dept
Gopher Dept
Happy Dept
Igloo Dept
Nursing Dept
NursingDept:Admin Dept:Emer Dept
NursingDept
Zebra Dept
Each single entry displayed above would be the first column value from entries that have only one value in the Department field. For the single value Department entries everything is in alphabetical order, but the multi-value departments it just prints out the values as they appear in the multi-value Department fields.
So my question is, how does the view know what value is actually supposed to be used from the multi-value department field? And then, how am I supposed to know this? Is there some special way to know what value you are actually using in that categorized column?
My goal is to just return the value it’s supposed to be, not the entire string of values. Without imploding the columnValue it returns an error and is therefore left blank. I’m perplexed to know how the view knows what value is really supposed to be used when it’s printing out all the values.
Any thoughts? Thank you for reading.
Tim Williams