I can't understand what I'm doing wrong here:
I'd like a ComboBox to either be visible or not (or I could use DisplayMode.Edit / DisplayMode.View) if another ComboBox is empty. However, it doesn't seem to work and even when I use:
If(!IsEmpty(ComboBox1.Selected),DisplayMode.View,DisplayMode.Edit) for the DisplayMode of the other ComboBox, it still seems to think that there is some content in the ComboBox even when it is actually blank / empty? This means the other ComboBox remains in VIEW mode even when the other box is blank?
Solved! Go to Solution.
However, it doesn't work unless I patch a blank back to the data list and then go into the gallery again. ThisItem.... doesn't know it's blank again until I patch back first.
When the gallery writes back to the SP list
When exactly does this happen when you "write back to the SP list"? Please be specific. Which control (a button?) and which property (OnSelect?) and what is the formula(s) you have that "write back to the SP list"?
This should not usually be needed, but see if placing
//example yourExistingFunction01; Refresh(yourDataSource) // - in the above, yourExistingFunction01 should be the function or functions you already have. Make sure to end it with a semicolon, preferably start a new line and add in the Refresh function in that new line // - in the above, replace yourDataSource below with the actual name of your data source
at the very end of the formula where you "write" and see if it helps.
I think what I mean is that the I clear down the combobox in the gallery, obviously the DisplayMode of the other combobox being set by "ThisItem..." doesn't 'know' the data source is blank again unless I patch the gallery back to the original data source. This means, I have to clear the ComboBox, save the gallery back, then go back into the gallery to now show that "ThisItem" is now blank again?
Something else I have just noticed as well in relation to this is that when I delete the item from the ComboBox so that it is blank again, when I patch the box back again, it is not actually deleting the item unless I choose another value? How can I get the Combobox when the item is removed, to patch a delete back to the data source and clear it down?
When would this come? If I clear the item in the ComboBox, I am just patching that ComboBox back again, the same as I would do if a value was chosen? Do I need to specifically patch Blank() under this scenario?
Try patching Blank() to the data source first.
If it doesn't work, you must do this first:
Can you check if turning on the formula-level error management setting helps with this?
1. Click Settings
2. Click Upcoming Features
3. Toggle the Formula-level error management setting to On
Then just close the modal, see if it works.