web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / button visible if comb...
Power Apps
Unanswered

button visible if combo box changed

(0) ShareShare
ReportReport
Posted on by 48

Hi, I have a combox with items 

LookUp(Sort(tbl_fruit,Created,SortOrder.Descending),Fruit.Value="Apple").FruitTaste

This is on a screen that loads and has the as the default selected items.
If the user changes the value I want a submit button to become visible to update the record source
I have tried the following and it throws error

Cbo_fruit.Selected.Value <> Previous(cbo_fruit.Selected.Value)
Categories:
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @inkbird01 ,

     

    What is the error message? Could you please show some screenshots?

    You can also try use variable to control the visibility of button.

    OnVisible of Screen.

    Set(var,false)

    OnChange of combo box.

    Set(var,true)

    Visible of button.

    var

     

     

    Best regards,

    Rimmon

  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @inkbird01 ,

    Screen's OnVisible property:

     

    Set(varPreviousValue, LookUp(Sort(tbl_fruit, Created, SortOrder.Descending), Fruit.Value="Apple").FruitTaste);
    Set(varCurrentValue, LookUp(Sort(tbl_fruit, Created, SortOrder.Descending), Fruit.Value="Apple").FruitTaste)

     

    This sets both varPreviousValue and varCurrentValue to the initial value of the ComboBox when the screen loads.

     

    ComboBox's OnChange property:

     

    Set(varCurrentValue, Cbo_fruit.Selected.Value)

     

    This updates varCurrentValue whenever the selected value in the ComboBox changes.

     

     

    Submit button's Visible property:

    varCurrentValue <> varPreviousValue

     This makes the submit button visible only if the current selected value is different from the initial value.

     

     


    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.

  • inkbird01 Profile Picture
    48 on at

    thanks but is there any easier way as I have multiple fruit combox boxes on the screen

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @inkbird01 ,

     

    Could you please provide more details?

    It will help us understand your requirements if you could provide some screenshots about your app.

     

    Best regards,

    Rimmon

  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @inkbird01 ,

    Simply compare the selected Item in the Combo Box/s with the current value in the data source

    Cbo_fruit.Selected.Value <> ThisItem.Fruit.Value

    To do this, the button would need to be inside the Form (to refer to ThisItem). Alternatively if the Item of your Form is a Record (varRecord or similar when it selected from the Gallery)

    Cbo_fruit.Selected.Value <> varRecord.Fruit.Value

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard