I had several subroutines that were all the same except for an arrayselectedbuild statement. I thought I would consolidate them into one subroutine. But I need to use different fields for the arrayselectedbuild. I thought the best way to do this was to use another parameter in the calling statement. Such as:
The field name is - Item - ,without the dashes. The second parameter (“Item”) being the field name I want to use in the arrayselectedbuild. I first tried,
arrayselectedbuild lvMyArray, ¶,"",parameter(2)
which didn’t work. I’ve tried many other ways, but no joy.
I finally worked around the problem by using a few “if” statements, like
if parameter(2) = "Item" arrayselectedbuild lvMyArray, ¶,"",Item endif
But I doubt that is the most efficient way.
Is there a way to use a parameter directly in the arryselectedbuild statement?