cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
galdezanni
Level: Powered On

Enable button - DisplayMode through conditions (lookup columns)

Hi guys,

 

I am trying to enable a button ("Concluir") in "DiplayMode" as long as it is meeting the following condition:

 

 

 

All items in the gallery are saved in a SharePoint list, each record in this list is made by saving the text of the gallery together with an item from an item selected in a dropdown ("Selecionar amostra" - Dropdown5), both are recorded in lookup columns.

 

I tried using this code:

 

ForAll(Label6_4.Alltems;
    CountIf(ExecucaoList;
            Text(
                LookUp(
                    QuestaoAuditoriaList;
                    Label6_4.Text = Título;
                    ID
                )
            ) in idQuestaoAuditoria.Value && 
            Text(
                LookUp(
                    EquipeAmostraList;
                    Dropdown5.SelectedText.idAmostra in idAmostra && TextInput2_57.Text in idOrdem.Id && Dropdown4.Selected.Value in idJurisdicionado.Value;
                    ID
                )
            ) in idAmostraExecutada.Value
        )
    )

 

And also with this:

 

 

ForAll(Gallery4_4.AllItems; 
    CountRows(
        Filter(
            ExecucaoList;
            Text(
                LookUp(
                    QuestaoAuditoriaList;
                    Label6_4.Text = Título;
                    ID
                )
            ) in idQuestaoAuditoria.Value && 
            Text(
                LookUp(
                    EquipeAmostraList;
                    Dropdown5.SelectedText.idAmostra in idAmostra && TextInput2_57.Text in idOrdem.Id && Dropdown4.Selected.Value in idJurisdicionado.Value;
                    ID
                )
            ) in idAmostraExecutada.Value
        )
    ))

 

 

 

In this gallery there is also a button that is also disabled when a condition is met. So, I also tried to enable this button, as long as all the buttons (Check - "Icon2_9") in the gallery items are disabled, but I also couldn't get it to work.

2 REPLIES 2
Microsoft v-siky-msft
Microsoft

Re: Enable button - DisplayMode through conditions (lookup columns)

@galdezanni 

 

Where does the formula apply to?

Could you describe more details about your logic condition? 

Sik

galdezanni
Level: Powered On

Re: Enable button - DisplayMode through conditions (lookup columns)

 
 

 

Hi @v-siky-msft , first thanks for contact.

 

 

 

ForAll(Label6_4.Alltems;
    CountIf(ExecucaoList;
            Text(
                LookUp(
                    QuestaoAuditoriaList;
                    Label6_4.Text = Título;
                    ID
                )
            ) in idQuestaoAuditoria.Value && 
            Text(
                LookUp(
                    EquipeAmostraList;
                    Dropdown5.SelectedText.idAmostra in idAmostra && TextInput2_57.Text in idOrdem.Id && Dropdown4.Selected.Value in idJurisdicionado.Value;
                    ID
                )
            ) in idAmostraExecutada.Value
        )
    )

 

 

 

or,

 

 

ForAll(Gallery4_4.AllItems; 
    CountRows(
        Filter(
            ExecucaoList;
            Text(
                LookUp(
                    QuestaoAuditoriaList;
                    Label6_4.Text = Título;
                    ID
                )
            ) in idQuestaoAuditoria.Value && 
            Text(
                LookUp(
                    EquipeAmostraList;
                    Dropdown5.SelectedText.idAmostra in idAmostra && TextInput2_57.Text in idOrdem.Id && Dropdown4.Selected.Value in idJurisdicionado.Value;
                    ID
                )
            ) in idAmostraExecutada.Value
        )
    ))

 

 

 

This code above is in "Display Mode" in "Icon7_16".

 

The idea is for him to check if all the items in "Galley4_4", specifically "Label6_4", are saved in my SharePoint list, with all these items saved in this list, this button is enabled for editing.

 

This verification is subject to some conditions:

 

1) if the ID of each content of "Label6_4" is registered in the "ExecucaoList" list in combination (on the same row) with the ID of the item selected in "Dropdown5";

 

2) the "Dropdown5" ID is located in the SharePoint list "EquipeAmostraList" from the item selected in "Dropdown5", the value in "TextInput2_57" and the item selected in "Dropdown4".

 

 3) the ID of "Label6_4" is found in the SharePoint list "QuestaoAuditoriaList".

 

These ID values ​​are searched because the columns "idQuestaoAuditoria" and "idAmostraExecutada" are of type LookUp in SharePoint.

 

Powerapps_Desabled_Button_Gallery.PNG

 

 

ExecucaoList.PNG

 

QuestaoAuditoriaList.PNG

 

EquipeAmostraList.PNG

 

 

==============

 

Another option that I thought of running was that: as the "Icon2_9" are disabled after the "Gallery4_4" items are saved, the "Icon7_16" button would be enabled for editing only if all "Icon2_9" buttons are disabled on your DisplayMode, but I also couldn't make it work.

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,583)