Hello, guys. I just don't know what to do anymore, so PLEASE, give me a hand or two, if possible...
I have a job to do to my boss. I creater a powerapps screen that saves data in a Sharepoint List, but one field of this screen, a combo box, receives data from the List to charge the choices available.
So here we are:
If I let any of the marked fields (*) blank and press "Save", it is supposed to appear an error screen:
So If I fill the blank fields, everything's ok!
BUUUUUT if I unmark, de-select the combobox previously selected item...
It keeps saving the data of this page on my Sharepoint List, and without one of the mandatory values... Did you understand?
This is what I put on Save button:
If(
!IsBlank(Titulo_Novo.Text) && <- this is the first mandatory item
(!IsEmpty(Unidade_Departamento_Regiao_Novo.Selected.Value) Or <- this line...
!IsBlank(Unidade_Departamento_Regiao_Novo.Selected.Value) <- and this line were supposed to be working, checking if the field (combo box), which is the second mandatory item, is not empty or is not blank!
)
&&
!IsBlank(Objeto_Novo.Text) <- this one is the third mandatory item.
;
Set(Borda_TituloNovo; Black);;Set(Borda_UnidadeNovo; Black);;Set(Borda_ObjetoNovo; Black);;Set(Borda_ValorNovo;Black);; <- here I'm turning all the three mandatory items borders black.
UpdateContext({Popup_Salva_Item:true}) && UpdateContext({Fundo_CinzaNovo:true}); <- here I'm showing an pop up information message and a gray screen behind it.
UpdateContext({Popup_Alerta_Campos:true}) && UpdateContext({Fundo_CinzaNovo:true}) <- here I'm showing an pop up warning message and a gray screen behind it.
)
The warning message should pop up on the screen if any of the three mandatory itens were blank.
Why the heck is that rule on the save button working for the combo box only if I select and item and de-select it? How should it be the correct way to write this rule?...
It works me
Use
IsBlank(Name_of_Box.Selected.Value)
and do something if it's blank... or....
!IsBlank(Name_of_Box.Selected.Value)
and have it do whatever if it's not blank...
This sounds like a new problem. Post it as the answer will be lost here.
I had similar kind of issue but I couldn't solve it.
I replaced Como box type for a text card, on submit button selected, I want it to show error message when not selected. During form filling and submitting error message is working fine. But when I redrive data and view it and if i submit with out changing these particular columns which i have changed datatype, only they show error message. Can you please explain why this is happening?
Hi all,
I have kind of a similar problem.
I have a button that is grayed out when there is no value in a combobox that is dependent of a dropdown list.
DisplayMode on the Button:
If(IsBlank(Choose_PH_Name);DisplayMode.Disabled)
Everything works fine, EXCEPT when I click the "X" in that combo which ends up displaying no value and the button is NOT grayed out, allowing to click and navigate.
Esle, if I change the dropdown item, than the combobox clears if there was any value in it, and the button is disabled (has blank() Default value). As I want it to.
Tried lot's of solutions to no avail.
Any help appreciated.
Thank you,
PSAR
Hi @leomosqueira,
FYI a Combobox contains a Table, even if it contains a single item or one column, so the appropriate function to test it would be IsEmpty() rather then IsBlank(). However, you can use IsBlank to test whether there is text in the Combobox's search property.
IsBlank(ComboBox1.SearchText)
wil give a true/false result that can be used to change the Items property of a gallery or data table. I use this to remove the filter from a gallery using an UpdateContext() variable.
If(IsBlank(Combobox2.SearchText),UpdateContext({itms: mydatasource}),
UpdateContext({itms:Filter(mydatasource,ID=Combobox.Selected.ID)})
and then set the Items property of a gallery to itms. That way if text is not typed into the Combobox, all the items in the gallery are shown or else the gallery is filtered on the Combobox.
If I understand you correctly, if there is no values in the ComboBox, or the values are removed from the ComboBox then show a message.
In this example I disable the save button but the method is the same.
The combobox Items are Units.Unit
Rule: IsEmpty(ComboBox1.SelectedItems.Unit)
DisplayMode for Submit (generated by the rule)
If(Rule2, DisplayMode.Disabled
, DisplayMode.Edit
)
Does this help, if so please mark as a solution (:
WarrenBelz
68
Most Valuable Professional
mmbr1606
41
Super User 2025 Season 1
MS.Ragavendar
38