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 / Multiple IF statements...
Power Apps
Unanswered

Multiple IF statements within a Collect statement

(0) ShareShare
ReportReport
Posted on by

Does PowerApps allow for multiple IF statements within a Collection?

 

Basically, I am collecting information through multiple drop downs. Users need the ability to either select a value from a drop-down or click a checkbox, which then allows the user to enter in text. I need the ability to collect values for either from the drop down or from the text input (depending on IF the checkbox is selected) 

 

**Note not all drop down values have a checkbox, only the ones specified in the code below**

 

 

Collect(AppCollectionCreate, {Title: "Created_Skill",Employee_x0020_Name: 'CS.Name_value'.Text,Skill_x0020_Category: 'CS.SkillCat_drop'.Selected.Value,Skill_x0020_Subcategory: If('CS.SubCat_check' = true, 'CS.SkillSubCat_textimput'.Text, 'CS.SkillSubCat_drop'.Selected.Value),Skill: If('CS.Skill_Check' = true, 'CS.Skill_textimput'.Text, 'CS.Skill_drop'.Selected.Value),Vendor: If('CS.Vendor_Check' = true, 'CS.vendor_textimput'.Text, 'CS.vendor_drop'.Selected.Value),Product: If('CS.Product_Check' = true, 'CS.Product_Textimput'.Text, 'CS.Product_drop'.Selected.Value), Proficiency: 'CS.proficiency_drop'.Selected.Value, Admin_Approval: "Yes"})

 

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

     

    ClearCollect(AppCollectionCreate, 
     { Title: "Created_Skill",
     Employee_x0020_Name: 'CS.Name_value'.Text,
     Skill_x0020_Category: 'CS.SkillCat_drop'.Selected.Value,
     Skill_x0020_Subcategory: If('CS.SubCat_check' = true, 'CS.SkillSubCat_textimput'.Text, 'CS.SkillSubCat_drop'.Selected.Value),
     Skill: If('CS.Skill_Check' = true, 'CS.Skill_textimput'.Text, 'CS.Skill_drop'.Selected.Value),
     Vendor: If('CS.Vendor_Check' = true, 'CS.vendor_textimput'.Text, 'CS.vendor_drop'.Selected.Value),
     Product: If('CS.Product_Check' = true, 'CS.Product_Textimput'.Text, 'CS.Product_drop'.Selected.Value), 
     Proficiency: 'CS.proficiency_drop'.Selected.Value, 
     Admin_Approval: "Yes"})

    Yes, PowerApps allow for multiple if statements for every elements within the collection.

    It is recommended to switch to ClearCollect for you to compare the collection difference with different conditions.

     

    Regards,

    Michael

     

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 1,045

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 592

Last 30 days Overall leaderboard