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 / Dropdown list selectio...
Power Apps
Unanswered

Dropdown list selection not triggering OnChange in form datacardvalue when value is updated from Dropdown

(0) ShareShare
ReportReport
Posted on by 10

I have a dropdown list built from a SP list and when I make a selection I change the value in a form datacardvalue box which is successful.  However, I kickoff several processes from the OnChange of the datacardvalue, but the OnChange is not triggered for some reason.  It appears that the string update from the dropdown list does not emulate keystrokes so the OnChange is never triggered.  Any help with this would be greatly appreciated.

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @bankhbl 

    You'll need to add some relevant code before anyone can help you with this.

  • bankhbl Profile Picture
    10 on at

    Thanks.  I've included two images to go along with the following description.

     

    The application scans and extracts text from magnetic tape labels and uses an AI model to put the text in the right Sharepoint column (the text boxes in the form.  Because there are so many different label formats there will be errors, so I built a dropdown list of all text extracted so the user can click on the datacard to update and then select the item in the dropdown which will then change the text in the datacard (this works fine).  The issue is that there are two Boolean variables set to control which datacard (each datacard has its own variable) will be updated (red box around Default).  The variable varAN is set to true in the OnSelect of the datacard select (this works) and the varListSelect variable is set to true when the item is selected in the list (works).  The issue is that when the new text from the dropdown string is inserted in the datacard the OnChange events (Green box) are not triggered which turns on the save edits button and updates the Boolean flag variables to keep same datacard from being updated again when the next datacard is selected for editing.

     

    CodeImage1.jpg
    CodeImage2.jpg
  • EddieE Profile Picture
    4,641 Moderator on at

    @bankhbl 
    Could you move you OnChange code from your Datacard to the OnChange of the Dropdown? Not 100% sure of your entire app logic but this may work?

     

    There seems to be some conflicting variables in your app. If this was my project, I'd add a number of labels each holding a different variable value then play the app and see how they all interact.

     

    Also, you could tidy up some of your code if you like?

    // Code refactoring
    
    // OnChange
    Set( valSave, DisplayMode.Edit);
    UpdateContext(
    	{
    		valStart: false,
    		varListSelect: false,
    		varAN: false
    	}
    )
    
    // OnSelect
    UpdateContext(
    	{
    		valStart: false,
    		varAN: true
    	}
    )
    
    // Default
    If(
    	varAN && varListSelect,
    	varDropDownItem,
    	Parent.Default
    )

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard