I have a function whereby is a combobox is blank or its item is deleted, I need another field to show a certain value.
I have set the DEFAULT to a text box to:
If(IsEmpty(Combobox),"7","4"
However, the function doesn't seem to 'know' that the combobox is blank or empty when I delete the value in it?
Many thanks!
If you select something from combobox and unselect it, IsBlank will cover this scenario and if your combobox is empty at the start, IsEmpty will work in this case
Perfect - many thanks!
Can't understand why you have use both IsBlank OR IsEmpty to make it work successfuly?
Hi @jed76 ,
The Default property for ComboBoxes is deprecated and should not be used anymore. It has been replaced with the DefaultSelectedItems property. Unfortunately, including a reference to itself will make the fomula circular and will hence generate error.
A way to make this work is to set the DefaultSelectedItems property to something like this (I used the ComboBoxSample for the Items property):
If(IsEmpty(ComboBox2.SelectedItems),Table({Value1 : "Item 4"},{Value1 : "Item 7"}))
Then set the OnChange property to:
If(IsEmpty(Self.SelectedItems),Reset(Self))
This will check if any items have been selected and reset the combobox if there are none, triggering the DefaultSelectedItems to be selected.
Hi,
You can use below formula -
If(IsEmpty(Combobox.SelectedItems) || IsBlank(Combobox.Selected.Value), "7", "4")
Put this function on the on change as well as the default...
Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.
LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
Twitter: https://twitter.com/phipps0218
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399