Hi!
I’m am writing a function that outputs an array of objects (uses a base object type that sits in the ontology named byCategory). The purpose of the function is to calculate some fields and output an object set that can populate a loop layout. The calculations (not included) are all working but these are not being recognised in matchedCategory which is returning the objects with no updated values. Given I am wanting to use the below for a function-backed object set and not to complete an action modifying the objects. Please can I get some ideas on how to resolve?
Note, the below has been anonymised
Thanks
@Function()
public async loopEngagement(narrative_set: ObjectSet<inputNarrative>, quantitative_set: ObjectSet<inputQuantitative>): Promise<byCategory[]> {
// Some calculations
const matchedCategory = CategoryLookup.get(Category);
if (matchedCategory) {
matchedCategory.CategoryC = currentScore;
matchedCategory.CategoryB = trend;
matchedCategory.CategoryA= secondScore;
subthemeLookup.set(subtheme,matchedSubtheme);
subthemeSet.push(matchedSubtheme);
}
}
return subthemeSet;
}