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 / Setting Combo box defa...
Power Apps
Answered

Setting Combo box default item from a parameter in a url

(0) ShareShare
ReportReport
Posted on by 104

Hi All,

 

I have two PowerShell Apps, App1 and App2. After pressing the submit button on App1 it lunches to App2 with a parameter within the Url called Parm001.

 

Launch(Concatenate("https://apps.powerapps.com/play/4807...%201)?ID=123&Parm001=",TextInput1.Text)

 

App2 has a combo box with data from a SharePoint list column. The combo box item is set to:

 

Choices([@'External User Access Request Form'].Project_x0020_Site)

 

App2 also sets a variable called TestVar2 with the text from the parameter Parm001 within onStart.

 

Set(TestVar2,Param("Parm001"))

 

I have placed a label on App2 and set the text to TestVar2 to view the parameter text and this works OK.

 

My question is, how do I set the combo box on App2 so its default item is set to Parm001 value?

 

I have tried [Parm001] but when I press the submit button on App2 it doesn’t add this to the SharePoint list. I think this is because it changes the Combo box default text but doesn’t select the item in the combo list.

 

I hope this makes sense to you. At the beginning of the week, I had a full head of hair, I am now bald from the stress this is giving me.

 

I hope you can help. Thanks
Colin

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @PowerStar321 

    If this is really a combobox, then set the DefaultSelectedItems property to : 

       {Value: Param("Param001")}

     

    I hope this is helpful for you.

  • CU-21081202-4 Profile Picture
    104 on at

    Hi RandyHayes,

     

    This partially worked. It automatically gave the combo box the default value of parameter, but when I pressed submit the parameter text doesn't showup the SharePoint item column.

     

    This column is a lookup column and within PowerApps the combo box items is set to

     

    Choices([@'External User Access Request Form'].Project_x0020_Site)

     

    Capture.PNG

     

    I hope you can help

    Colin

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @PowerStar321 

    So that is, I believe, a somewhat separate issue than your original.  Your original was how to get the parameter passed and set the defaultselectedItem.

    This now has to do with saving that to your list.

    Tell me more about the submit button....is this in an EditForm or something else?  If it is an edit form, what is the Update property of the datacard that contains the combobox?  And, you mention the underlying column is a Lookup column...please clarify.

  • Verified answer
    CU-21081202-4 Profile Picture
    104 on at

    The below formula for the DefaultSelectedItems property worked for me:

     

    LookUp( Choices([@listname].lookupcolumn) ,Value=Label1.Text)


    Thanks for all your help

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard