I have a multiselect combo box with various options for the user to choose from, each option has different questions I want them to answer.
I'd like to use the tab list control and put each different type of question on a different tab.
I added an on change expression to the combobox:
ClearCollect(
TabCollection,
{Tab: """1. Change Details"""} // Always include this base tab
);
// Add entries dynamically based on selection
If(
"Payroll (Worksite Address, PTO Days, New 1099 Sponsor, Start Date, Expense Rates)" in ForAll(ComboboxCanvas1.SelectedItems, Value),
Collect(TabCollection, {Tab: """2. Payroll"""})
);
If(
"Billing (PO Number, CRF Project, Billing Profile)" in ForAll(ComboboxCanvas1.SelectedItems, Value),
Collect(TabCollection, {Tab: """3. Billing"""})
);
The collection gets built as expected.
Then for the items property ont he tab list I have:
[Concat(TabCollection, Tab, ",")]
It accepts this, but the problem is it only creates one tab.
I've tied a few other variations of this too... so instead of putting the double quote in the collection i tried adding in the tab list:
"[" & Concat(TabCollection, """" & Tab & """", ",") & "]"
But this kept failing saying it expected a table value.
I think it fails because it wants to see the [ and ] in there not the "[" and "]" if that makes sense.
When I put just this in a label it shows correctly:
Concat(TabCollection, """" & Tab & """", ",")
So does anyone see what I'm doing wrong here?
Thanks,
Terry