I am using this loop to get the values of a generic inquiry. the requirements it needs to loop all columns in the Inquiry in order and get the value of each column.
The code below is working but only for fields in the Generic Inquiry that are based on an actual Field. So if I have a field I put in the Caption “Field” and the formula = ‘Test’
it doesn’t bring back Test as I would expect, it brings back “” - no value? When I preview the data
I see ‘Test’ but when pull the data using below I get ‘’
Any clue would be appreciated.
foreach (GenericResult resultRow in graph.Views["Results"].SelectMulti())
{
foreach (string key in resultRow.Values.Keys)
{
foreach (GIResult resultMap in PXSelectReadonly<GIResult, Where<GIResult.designID, Equal<Required<GIResult.designID>>, And<GIResult.objectName, Equal<Required<GIResult.objectName>>>>>.Select(graph, new object[] { templates.Current.DesignID.Value, key }))
{
var result = graph.Caches[resultRow.Values[key].GetType()].GetValue(resultRow.Values[key], resultMap.Field);
sLine = sLine + "\"" + result + "\"" + resultMap.Field.GetType().ToString() + resultMap.Field.GetTypeCode();
}
}
}