Specifically regarding the Excel setup sheet, I have been trying to duplicate the behavior of the workOffset variable that displays either the workOffset(if one setup is selected) or "Multiple" (if more than one setup is selected).
//in the getProgramInfo() function
for (var i = 0; i < numberOfSections; ++i) {
var section = getSection(i);
if (workOffset == undefined) {
workOffset = section.workOffset;
} else {
if (workOffset != section.workOffset) {
multipleWorkOffsets = true;
}
}
.....
// then output here
result["workOffset"] = multipleWorkOffsets ? "Multiple" : workOffset;I noticed in the documentation that getGlobalParameter() only grabs the first instance, so I did try to implement onParameter(). Ive tried a bunch of methods and locations, but Im out of ideas now and I dont think I understand the root cause of the issue to get to the exact answer.
Im not necessarily looking for an exact solution, even a few ideas to play around with would be great.
Hi. Just some insights, how it works.
"job-description" is specified for the first section in the setup.
getProgramInfo function is called from onOpen before any section is specified.
You can use onParameter function to update current setup name. As I see, this function is defined in excel setup sheets already and collects all parameters. So, "job-description" should be already in cachedParameters for first section in setup. Not exactly, as for first setup it will go into programInfo.
Anyway, you can check, if there is "job-description" in cachedParameters in onSection callback and set
Can't find what you're looking for? Ask the community or share your knowledge.