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 / Formula for collection
Power Apps
Answered

Formula for collection

(0) ShareShare
ReportReport
Posted on by 58

I am looking to use a button to collect data and transfer to a gallery, one of the input boxes is a drop down and I can't seem to figure out how to make the formula work, the below is the formula I have now;

ClearCollect(
    ForAll(
    contactrequest,
        {

            Account_Id: TextInput2.Text,
            Bpm_Id: TextInput3.Text,
            Responsibilty_Center: DropdownCanvas3.Selected,
            Admin: TextInput5.Text,
            Resp_Product: TextInput6.Text,
            Resp_Group: TextInput7.Text
        }
    )
I also want my drop down to determine the population of two other input boxes based on a separate list I have;
JuanGarcia9_0-1709747386668.png

 

I appreciate the help in advance!

 
Categories:
  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    ClearCollect works in a way to accept a collection you want to add an element(s) to as a first parameter. You didn't provide enough information so I would assume that contactrequest is the target collection. Try this:

     

     

    ClearCollect(
    	contactrequest,
    	{
    		Account_Id: TextInput2.Text,
    		Bpm_Id: TextInput3.Text,
    		Responsibilty_Center: DropdownCanvas3.Selected,
    		Admin: TextInput5.Text,
    		Resp_Product: TextInput6.Text,
    		Resp_Group: TextInput7.Text
    	}
    )

     

    Also, keep in mind that "ClearCollect" will wipe out all the existing data from the collection. So if you want to accumulate added data in that collection you should use Collect instead of ClearCollect.

  • JuanGarcia9 Profile Picture
    58 on at

    I appreciate the assistance, I tried the formula and only two of the boxes were transferred;

    Collect(
        contactrequest,
        {
            Account_Id: TextInput2.Text,
            BPM_Id: TextInput3.Text,
            Responsibility_Center: DropdownCanvas3.Selected,
            Admin: TextInput5.Text,
            Resp_Product: TextInput6.Text,
            Resp_Group: TextInput7.Text
        }
    )
    JuanGarcia9_1-1709753862524.png

     


     

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Please provide the "Text" formulas for columns that did not make it.

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Responsibilty_Center: DropdownCanvas3.Selected.Value 

    ???

  • JuanGarcia9 Profile Picture
    58 on at

    that was the issue, the text formula was not matching! now I just need the drop down data to transfer, I tried the .value suggested below and that did not work.

  • JuanGarcia9 Profile Picture
    58 on at

    the formula won't accept this for some reason ;

    JuanGarcia9_0-1709757288979.png

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @JuanGarcia9,

    Here are 2 tips for your reference:

    1). Replace the .value with .Value, which is case sensitive

    2). Not sure how you set the Items property of this dropdown control, which is the key to your issue.

    If the formula you set for dropdown Items property returns a Text column directly, you need to refer to that column name like:

    dd_Status.Selected.ColumnName

    vqiaqimsft_0-1709788471062.png

     

  • JuanGarcia9 Profile Picture
    58 on at

    Hey Qi,

     

     I apologize for my ignorance, I tried the above and the formula is good but the transfer is still blank;

    JuanGarcia9_0-1709818768978.pngJuanGarcia9_1-1709818807623.png

     

    JuanGarcia9_2-1709818820686.png

    I attached pictures of the item properties for the drop down.

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    It depends what's in your drop down.

    Can you paste in here whatever is in the Items property of the drop down?

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    I missed the screenshot of the Items screenshot. 

    - Add a classic drop down inside the same card

    - Configure the classic drop down the same way as the modern drop down

    - Reference the classic drop down instead of the modern one
    What is the result?

    There's only about 5 modern controls approved for production use and the modern drop down is definitely not one of them as it's still in Preview.

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

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard