Is there a way to control the order in which Worksheets are processed? (At least I think that is my issue)
I have several worksheets, one of which creates a variable list. My last worksheet (last one to the right) contains an NL("Sheets") that references a variable from another Worksheet to filter it's results. In doing so, only a single sheet is being created. If I remove the dynamic filter, then it generates several worksheets.
For example, I have a worksheet that performs an NL("Rows") to obtain all Active Reps for a given department. This is pulled from a separate Datasource from our NAV Database. I have a column that CONCATENATE's ID values down all of the NL("Rows"), for example it pulls:
Worksheet 2
—————-
Row 1: 123
Row 2: 123|456
Row 3: 123|456|789
Row 4: <blank row>
Row 5: Excel Formula that references the value in Row 3, so it contains 123|456|789. This Cell is also a Named Range, called IDFilter
Worksheet 7
—————
Cell C2: =NL("Eval", =IDFilter), after the report is done processing, it shows the value 123|456|789
Cell C3: =NL("Sheets", Table, SecondaryID, "ID", $C$2)
However, instead of creating a sheet for every ID, it only creates a single sheet. If I replace Cell C3 as follows:
=NL("Sheets", Table, SecondaryID, "ID", "123|456|789"), then it works correctly, so I know the logic isn't broken, but there seems to be an Order of Operation Issue.
For what it's worth, my scenario is a bit more complicated than explained above, but I wasn't attempting to simplify for the purposes of explaining the scenario. It would be possible to replace the filter on my NL("Sheets") to filter differently, but it wouldn't be as clean for other reasons.
Thanks for your assistance.
2 comments
-
Jet Reports Historic Posts <rubbish removed>
I think that you can use the NL function from worksheet 2 directly in your NL(Sheets) function, but instead of NL(Rows) you should use NL(Filter) which creates a pipelined list.
HTH
rmw -
Jet Reports Historic Posts So the problem is an order of operations problem. NL(Sheets) is always evaluated first (for the entire workbook), then NL(Columns), then NL(Rows). If you think about what happens with most reports, there are formulas like NL(Rows) that reference the result of an NL(Sheets) formula. So if you expanded the NL(Rows) first, then expanded the NL(Sheets) then every sheet would have the same values, which would be incorrect. I'm not sure exactly how you need to go about getting your result, but you should probably either use NL(Filter) or Link= within your NL(Sheets) formula to get the filter value you need.
Regards,
Hughes