cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shaneOZ
Level 8

Submit Icon on visible after Nested Gallery item has been clicked

Hi,

 

Im trying to make an app where the user has to press on the buttons in a nested gallery before the submit button is visible, but i cant seem to find the right code,

 

(This code is wrong its for not showing if the Defect button is clicked)

forum.png

 

 

Any help?

4 REPLIES 4
Dual Super User
Dual Super User

Re: Submit Icon on visible after Nested Gallery item has been clicked

Hi @shaneOZ 

 

Gallery Items:

["Ok","N/A","Defect"]

 

Screen OnVisible:

UpdateContext({btnClicked:""})

 

 

Gallery Button OnSelect code:

UpdateContext({btnClicked:ThisItem.Value})

 

Hiding the Icon or button

If(btnClicked="Defect" || btnClicked="" ,false,true)

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

 

 

 

shaneOZ
Level 8

Re: Submit Icon on visible after Nested Gallery item has been clicked


@RezaDorrani wrote:

Hi @shaneOZ 

 

Gallery Items:

["Ok","N/A","Defect"]

 

Screen OnVisible:

UpdateContext({btnClicked:""})

 

 

Gallery Button OnSelect code:

UpdateContext({btnClicked:ThisItem.Value})

 

Hiding the Icon or button

If(btnClicked="Defect" || btnClicked="" ,false,true)

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

 

 

 


Thankyou for you reply here is the code that is currently in the on select

 

If(
CurrentServBrakCHK = ThisItem.ServBrakCHK || CurrentServBrakCHK = Blank(),
Set(CurrentServBrakCHK, ThisItem.ServBrakCHK);Patch(ServiceBrakeList, ThisItem, {IsClicked: !ThisItem.IsClicked}),
Set(CurrentServBrakCHK, ThisItem.ServBrakCHK);UpdateIf(ServiceBrakeList, true, {IsClicked:false});Patch(ServiceBrakeList, ThisItem, {IsClicked: !ThisItem.IsClicked})
)

Can i still use that same code with it i.e.

 

;UpdateContext({btnClicked:ThisItem.Value})

at the end?

Dual Super User
Dual Super User

Re: Submit Icon on visible after Nested Gallery item has been clicked

Hi @shaneOZ 

 

I am not sure what this code does but you can just add the code at the end 

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

shaneOZ
Level 8

Re: Submit Icon on visible after Nested Gallery item has been clicked

 


@RezaDorrani wrote:

Hi @shaneOZ 

 

I am not sure what this code does but you can just add the code at the end 

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.


Sorry i cant i get an error

The code i have in my gallery is started on the onstart part of the app

 

ClearCollect(
    ServiceBrakeList, 
  {ServBrakCHK:"OK", IsClicked:false},
  {ServBrakCHK:"N/A", IsClicked:false},
  {ServBrakCHK:"Defect", IsClicked:false}
  );

Set(CurrentServBrakCHK, Blank()); 

and then is used onselect

 

If(
    CurrentServBrakCHK = ThisItem.ServBrakCHK || CurrentServBrakCHK = Blank(),
    Set(CurrentServBrakCHK, ThisItem.ServBrakCHK);Patch(ServiceBrakeList, ThisItem, {IsClicked: !ThisItem.IsClicked}),
    Set(CurrentServBrakCHK, ThisItem.ServBrakCHK);UpdateIf(ServiceBrakeList, true, {IsClicked:false});Patch(ServiceBrakeList, ThisItem, {IsClicked: !ThisItem.IsClicked})
)

 

If i use yours on the bottom of it i get an incompatible type error?

 

 

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,849)