It seems that this should be simple to do, but I am too Javascript challenged to figure this out.
I want to construct a calculated field to show on a list form whose value is the value of another dataprovider in the same table where the dataprovider name is provided in a global field, rather than hard-coding the dataprovider name in the calculation method. Obviously returning the global field (eg. return scopes.globals.fieldName) doesn't work. I gather that i need to return an object but not sure how to construct it? I also tried writing a form method that returns the value of getDataProviderValue() to the calculation, but this only gives the value of the first record of the foundset, rather than the value for each individual record as would be the case if the dataprovider was hardcoded into the method.
Any idea how (or whether) I can do this? Thanks!