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 / Ptaching activity chec...
Power Apps
Unanswered

Ptaching activity check combobox is blank or slected any value

(0) ShareShare
ReportReport
Posted on by

Hello Everyone,

I'm new to PowerApps and have a form linked to a Sharepoint List.
I'm patching some data to a sharepoint list, and while I'm doing it, I'd want to see whether the combobox has a chosen item or if it's empty, and then I'd like to update the data in the sharepoint List column.


I can only complete the part when the Combobox is set to Data. However, I am unable to obtain the desired outcome if the combobox data is left blank. If somebody could assist me in this circumstance, it would be greatly appreciated.

 

Prathamesh2415_0-1699445184571.png

If(
IsBlank(ComboBox2.Selected),
{'Column Name': "Data not present"},
{'Column Name': "Data Present"}
)


PATCH CODE :

ForAll(ComboBox1.SelectedItems As ColCollection,ForAll(ComboBox2.SelectedItems As B,ForAll(ComboBox3.SelectedItems As C,
Patch(PowerAppList,
Defaults(PowerAppList),
{Title: "Mr"},
{abc: Name.Text},
{Country: ColCollection.COMPANY},
{System: B.SYSTEM},
{'App Requested': C.'App requested'},
If(
IsBlank(ComboBox2.Selected),
{'A': "Data not present"},
{'B': "Data Present"}
)
)
)
)
);

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    Try using ComboBox2.SelectedItems instead of ComboBox2.Selected. Also, since you are using ForAll for ComboBox2, you need to check if all selected items are blank. Here's an updated version of your code:

     

    ForAll(
     ComboBox1.SelectedItems As ColCollection,
     ForAll(
     ComboBox2.SelectedItems As B,
     ForAll(
     ComboBox3.SelectedItems As C,
     Patch(
     PowerAppList,
     Defaults(PowerAppList),
     {Title: "Mr"},
     {abc: Name.Text},
     {Country: ColCollection.COMPANY},
     {System: B.SYSTEM},
     {'App Requested': C.'App requested'},
     If(
     IsBlank(ComboBox2.SelectedItems),
     {'A': "Data not present"},
     {'B': "Data Present"}
     )
     )
     )
     )
    )

     

    This change should check if all selected items in ComboBox2 are blank and then handle the PATCH accordingly. Give it a try, and let me know if it works for you!

  • Prathamesh2415 Profile Picture
    on at

    Hello @Shaheer I tried this approach as well but with this approach it didn't patch any data to Sharepoint List and none of the entries are filled with data

  • Prathamesh2415 Profile Picture
    on at

    ForAll(
    ComboBox1.SelectedItems As A,
    ForAll(
    ComboBox2.SelectedItems As B,
    ForAll(
    ComboBox3.SelectedItems As C,
    If(
    IsBlank(ComboBox2.Selected),
    Patch(
    PowerAppList,
    Defaults(PowerAppList),
    {Title: "Mr"},
    {abc: Name.Text},
    {Country: A.COMPANY},
    {'App Requested': C.'App requested'},
    {'Last name': "Data not Present"}
    ),
    Patch(
    PowerAppList,
    Defaults(PowerAppList),
    {Title: "Mr"},
    {abc: Name.Text},
    {Country: A.COMPANY},
    {System: B.SYSTEM},
    {'App Requested': C.'App requested'},
    {'Last name': "Data Present"}
    )
    );
    )
    )
    );

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 509 Most Valuable Professional

#2
Haque Profile Picture

Haque 302

#3
11manish Profile Picture

11manish 265

Last 30 days Overall leaderboard