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 / Issue with OnChange Co...
Power Apps
Unanswered

Issue with OnChange Combobox inside the gallery

(0) ShareShare
ReportReport
Posted on by 133

I’m trying to patch the changes into the collection. 

This combobox is single selected value and searchable.
I’m using OnChange function of the combobox where I’m patching the changes into the collection.
Here is the code I tried.

 

 

Patch(Collection1, ThisItem, {Currency : Self.selected.Value,
ModifiedData: If(ThisItem.ModifiedData ="C","C",ThisItem.ModifiedData="N","N","M")})

 

 

I tried removing modified data and then it is working fine.
In Defaultselectedvalue, I’m passing this value.

{Value: ThisItem.Currency}


What is wrong with the formula? 

Categories:
  • Rhk Profile Picture
    133 on at

    @WarrenBelz  , @developerAJ  Can you help me out with this?

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

    Hi @Rhk ,

     

    After Checking your formula, we found that there is a mistake in your formula.

    Patch(Collection1, ThisItem, {Currency : Self.Selected.Value,
    ModifiedData: If(ThisItem.ModifiedData="C","C",ThisItem.ModifiedData="N","N","M")})

     

    Best Regards,

    Tina

  • Rhk Profile Picture
    133 on at

    Hii Tina,
    Thanks for your reply, Sorry about that, It was a typo.

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

    Hi @Rhk ,

     

    Have we solved this issue, or it is just a typo?

    If it is just a typo, can you offer the Items of the Gallery and the formula about the Collection1?

     

    Best Regards,

    Tina

  • Rhk Profile Picture
    133 on at

    I’m store the sql data in Collection and I have few columns ex- FName, LName, Currency, ModifiedData.
    Where FName and LName are Text Inputs and On Change is as same as the combobox but the column name and values will be changed but ModifiedData will be same, If they do some changes in that field then That item’s modifiedData should update with “M”… It stays “N” if it is “N” by 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

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard