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 / Combo box filter based...
Power Apps
Answered

Combo box filter based on Radio Button

(0) ShareShare
ReportReport
Posted on by 17

Oversimplification: I am trying to filter a Combo Box based on a category selection in a Radio button. I can get the filtering part working but when I try to update the record (submit form) any syntax I try either results in a network error or doesn't save that field to the SharePoint List. I'm sure it has something to do with how I'm referencing values vs records but I can't figure it out.

 

SPListA: 'Risk Tracking TEST' Master list of all records where I'm attempting to store the data

Field RiskFactors: multiple select field, with a lookup to SPListB

 

ID

Date

RiskFactors

Age

FileType

1

2022-02-07

Alcohol - alcohol abuse by person

Crime Victimization - other

25

Home

Environment

 

SPListB: 'RiskFactors' Reference list of all RiskFactors and related RiskCategories

 

RiskCategory

RiskFactor

Alcohol

Alcohol - alcohol abuse by person

Alcohol

Alcohol - alcohol abuse in home

Crime Vicitimization

Crime Victimization - other

 

On the entry form the Risk Category radio is filtering the Risk Factors combobox, and I can select multiple values (see attached screenshot) but the update isn't working. I'm aware I've made this more confusing for myself by having a reference list and field name be the same name.

 

Risk Factors combo box items:

 

(Filter(RiskFactors, Radio2.Selected.Value = 'Risk Category'))

 

Risk Factors data card update (got this from a different post):

ForAll(

    DataCardValue21.SelectedItems,

    {Value: 'Risk Tracking TEST'.RiskFactors}

)

 

Not sure which piece(s) I may have wrong.

radio filter.jpg
Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @NKov 

    Try just DataCardValue21.SelectedItems in the Update property of the card. 

  • NKov Profile Picture
    17 on at

    That's what the Update property on the card was initially and it didn't work. I would either get a network error or it would save the record but there would be nothing saved in that field on the SP List.

     

    What's weird is that it's inconsistent in when it gives the network error. I will get the error if I try to just play the app, but if I play it within the app Monitor tool it doesn't give an error, just does the saving with no value in that field. 

     

    When the update property is set to DataCardValue21.SelectedItems in the Monitor app the createRow operation it looks like it's registering that I selected three items in the combo box but the values are blank. 

         "body": {
            "Title": "2023-12",
            "OpenDate": "2023-02-12",
            "NumberofTimesDiscussed": 1,
            "RiskFactors": [
              {},
              {},
              {}
            ],
            "Year": 2023,
            "FileID": 12,
            "RiskFactors@odata.type": "#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference)"
          }
    network error.jpg
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @NKov 

    It sounds like the card is corrupted.  Try deleting it and  then adding it back again.  FYI: There are only two aspects of a data card that are important.  The DefaultSelectedItems property of a combobox control inside and the Update property of the card.  The rest is just window dressing. 

  • NKov Profile Picture
    17 on at

    Unfortunately that didn't fix the issue.

     

    • I deleted the data card completely
    • saved and left the app
    • reopened the app for editing
    • readded the data card
    • added the custom radio button for the category selection and set with the applicable field
    • reset the filter on the combo box to use the radio button as a filter
    • and left the Update on the data card as DataCardValue21.SelectedItems (which is the correct data card number - when it was readded it ended up with the same id)

     

    but the data still won't update on the SharePoint list, it doesn't error out, it just doesn't save the values. 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @NKov

    Will it save if you don't use the radio control but leave it as it is? 

  • NKov Profile Picture
    17 on at

    If I leave the radio control out of the equation -- remove the filter from the combo box so that the items is just   Choices([@'Risk Tracking TEST'].RiskFactors) rather than (Filter(RiskFactors, Radio1.Selected.Value = 'Risk Category')) then it works fine, data saves without any issue, all items selected get saved to the list. 

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @NKov 

     

    Filter(Choices([@'Risk Tracking TEST'].RiskFactors), Value in Radio1.Selected.'Risk Category')

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @NKov 

     

    Filter(Choices([@'Risk Tracking TEST'].RiskFactors), Value in Radio1.Selected.'Risk Category')

     

  • NKov Profile Picture
    17 on at

    Unfortunately that doesn't work, it gives the error 'Name isn't valid.'Risk Category' isn't recognized.

    risk category.jpg
  • Verified answer
    NKov Profile Picture
    17 on at

    I was finally able to get the combo box to work properly and save the selected values. Had to change the Items on the combo box to: 

     

    Filter(Choices([@'Risk Tracking TEST'].'Risk Factors'), Value in Filter(RiskFactors, Category = Radio1.Selected.Value).'Risk Factors',DataCardValue21.SearchText in Value )

     

    As it needed to refer to the separate category list but still select from the choices on the original list. 

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard