Skip to content

Instantly share code, notes, and snippets.

@sampetrosov
Created January 20, 2021 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sampetrosov/05d6c7087f05f2f921a296c2ce55197d to your computer and use it in GitHub Desktop.
Save sampetrosov/05d6c7087f05f2f921a296c2ce55197d to your computer and use it in GitHub Desktop.
// Token: 0x06008B8F RID: 35727 RVA: 0x00245EF8 File Offset: 0x002440F8
public void GenerateResultField(GIResult gir, bool groupingActivated, GITable git, Type cacheType, PXCache cache, bool cleanable = false, bool forceCount = false)
{
if (string.IsNullOrEmpty(gir.Field))
{
throw new PXException("The field or table '{0}' in the inquiry design is invalid.");
}
bool isCountField = gir.Field == "$<Count>";
bool isCountAggregate = !isCountField && ((groupingActivated && gir.AggregateFunction == "COUNT") || forceCount);
bool isFormula = gir.Field.StartsWith("=");
string field = (isCountField | isCountAggregate) ? ("Count" + PXGenericInqGrph.GetExtFieldId(gir)) : (isFormula ? ("Formula" + PXGenericInqGrph.GetExtFieldId(gir)) : gir.Field);
string str = (git.Alias == cacheType.FullName) ? cacheType.Name : git.Alias;
string fieldName = str + "_" + field;
if ((!isFormula && !isCountField && !cache.Fields.Contains(gir.Field) && !this.g.ContainsKey(fieldName) && !cleanable) || (isFormula && !isCountAggregate && !this.BaseQueryDescription.FormulaFields.Any((PXFormulaField f) => string.Equals(f.Name, field, StringComparison.OrdinalIgnoreCase))))
{
return;
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment