Hi Guys,
I have an app which includes a gallery where a user can select a number of products. On each gallery item there are 2 combo boxes, let's call them cmb_1 and cmb_2. cmb_1 acts as a filter for cmb_2. A product hierarchy if you like.
After I have saved the first product it patches to a collection, when I then go back and change cmb_1 I would like to clear the contents of cmb_2 but I can't get it working.
The default selected items property of cmb_2 is:
{Value:ThisItem.ProductCategory}
So it will take the value of whatever is in the collection and I can't get it to clear. This means a user could potentially save an invalid product combination.
I tried to reset it by adding the following code to the on change of cmb_1:
UpdateContext({varReset:true});
UpdateContext({varReset:false})
And then the following code to the reset of cmb_2:
varReset
This does work if I haven't patched the record to the collection but after I patch it cmb_2 value won't clear.
I understand why it's happening, just not sure how to fix it.