Cheers.
I starteed out with 7 galleries but its a pain to make changes. I'm currently updating so I have only one gallery and I have noticed that it is a tad bit slower cycling between the datasources but I do think it will perform better in the long run.
This is my if statement for the gallery Items. The variable is a true or false value depending on the button selected. Any suggestions to improve?
If(varACB, Sort(collMCCBProductlist,ID),
If(varACB_Ass, Sort(collACBAccessoriesProductlist,ID),
If(varMCCB, Sort(collMCCBProductlist,ID),
If(varMCCB_Ass, Sort(collMCCBAccessoriesProductlist,ID),
If(varILine, Sort(collILineProductlist,ID),
If(varIC, Sort(collInstrumentationCableProductlist,ID),
If(varSundries, Sort(collSundriesProductlist,ID)
)))))))
This is my patch code that updates a quantity field in the relevant list. Any suggestions to improve?
Patch(
If(varACB, 'ACB Product List',
If(varACB_Ass, 'ACB Accessories Product List',
If(varMCCB, 'MCCB Product List',
If(varMCCB_ass, 'MCCB Accessories Product List',
If(varILine, 'I-Line Product List',
If(varIC, 'Instrumentation & Cable List',
If(varSundries, 'Sundries Product List'
))))))),
First(Filter(
If(varACB, 'ACB Product List',
If(varACB_Ass, 'ACB Accessories Product List',
If(varMCCB, 'MCCB Product List',
If(varMCCB_ass, 'MCCB Accessories Product List',
If(varILine, 'I-Line Product List',
If(varIC, 'Instrumentation & Cable List',
If(varSundries, 'Sundries Product List'
))))))),
ProductID=ThisItem.ProductID And PartID = ThisItem.PartID)), {Quantity: Value(TextInput4_12.Text)});
ClearCollect(
If(varACB, Sort(collMCCBProductlist,ID),
If(varACB_Ass, Sort(collACBAccessoriesProductlist,ID),
If(varMCCB, Sort(collMCCBProductlist,ID),
If(varMCCB_Ass, Sort(collMCCBAccessoriesProductlist,ID),
If(varILine, Sort(collILineProductlist,ID),
If(varIC, Sort(collInstrumentationCableProductlist,ID),
If(varSundries, Sort(collSundriesProductlist,ID)
))))))),
Filter(
If(varACB, 'ACB Product List',
If(varACB_Ass, 'ACB Accessories Product List',
If(varMCCB, 'MCCB Product List',
If(varMCCB_ass, 'MCCB Accessories Product List',
If(varILine, 'I-Line Product List',
If(varIC, 'Instrumentation & Cable List',
If(varSundries, 'Sundries Product List'
))))))),
ProductID = Value(varThisProductInfo.ProductID)));