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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 421

#2
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard