cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Default Selected Item not updating in sharepoint list

I am trying to auto select drop down value based on who is logged in. I have set the DefaultSelectedItems property of the drop down to [EmployeeID] which is a label from the previous screen which holds the Employee ID. The ID gets selected automatically in the drop down but when I submit the form, the ID doesnt update in the sharepoint list. See the pictures attached below. Please help me

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Default Selected Item not updating in sharepoint list

Hi @sufiyan_akhtar ,

Could you please share a bit more about the Employee_ID field in your SP list? Is it a Choice type column or LookUp type column?

Does the [EmployeeID] represents a Label control within your previous screen?

 

Based on the issue that you mentioned, I think there is something wrong with your operation. I have made a test on my side, please take a try with the following workaround:

1. If the Employee_ID field is a Choice type column in your SP List:

Set the DefaultSelectedItems property of the EmployeeID ComboBox to following:

If(
    EditForm1.Mode = FormMode.New,   /* <-- EditForm1 represents the Edit form in your app  */
    {
      Value: [EmployeeID].Text         /* <-- [EmployeeID] represents the Label control in your Previous screen */
    },
    Parent.Default
)

 

2. If the Employee_ID field is a LookUp type column in your SP List:

Set the DefaultSelectedItems property of the EmployeeID ComboBox to following:

If(
    EditForm1.Mode = FormMode.New,   /* <-- EditForm1 represents the Edit form in your app  */
    {
Id: LookUp(ReferencedSPList, ReferencedColumn = [EmployeeID].Text, ID), Value: [EmployeeID].Text /* <-- [EmployeeID] represents the Label control in your Previous screen */ }, Parent.Default )

Note: I assume that the Employee_ID column in your current list references values from the ReferencedColumn in your ReferenedSPList.

 

Please consider take a try with above solution, then check if the issue is solved.

 

More details about setting a default value within a Choice or LookUp column, please check the following blog:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/?utm_source=p...

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

16 REPLIES 16
Highlighted
Responsive Resident
Responsive Resident

Re: Default Selected Item not updating in sharepoint list

Hi Sufiyan,

 

Slight confusion here are you using Dropdown or combobox.

 

if you are using Dropdown then Default value has to be set to 'Default' Property and while saving the dropdown value to sharepoint list use "Dropdown1.SelectedText.Value"

 

If you are using Combobox then Default value has to be set to 'DefaultSelectedItems' Property and while saving combobox value to sharepoint list use "Concat(ComboBox1.SelectedItems, Value1 & ",")" (gets all selected items of combobox)

 

Hope that solves your issue.

 

Please mark answer as verified if it helped you.

 

Regards,

Pavan Kumar Garlapati

Highlighted
Helper I
Helper I

Re: Default Selected Item not updating in sharepoint list

@PavanKumarHey Thanks for your reply, Im using a combo box, I didnt understand what you meant though. Can you please explain in a bit more detail.

Highlighted
Responsive Resident
Responsive Resident

Re: Default Selected Item not updating in sharepoint list

Hi,

 

If you are using Combobox then Default value has to be set to 'DefaultSelectedItems' Property and while saving combobox value to sharepoint list use "Concat(ComboBox1.SelectedItems, Value1 & ",")" (gets all selected items of combobox)

 

this formulae will help you to get all selected items of the combobox then you can use that in Patch to create/update in sharepoint list.

 

Mark the answer as verified if it helps.

 

Regards,

Pavan Kumar Garlapati

Highlighted
Helper I
Helper I

Re: Default Selected Item not updating in sharepoint list

Dear Pavan,

Is this what you mean? Kindly see the pic below

Highlighted
Helper I
Helper I

Re: Default Selected Item not updating in sharepoint list

@PavanKumar 

 

Dear Pavan,

Where exactly do I put this formula - "Concat(ComboBox1.SelectedItems, Value1 & ",")" 

Which property? Is it in some property of the Combo box?


@sufiyan_akhtar wrote:

Dear Pavan,

Is this what you mean? Kindly see the pic below


 

Highlighted
Responsive Resident
Responsive Resident

Re: Default Selected Item not updating in sharepoint list

Hi Sufiyan, am afraid am unable to open the image. Could you please check or write what exactly have you tried. Regards, Pavan Kumar Garlapati
Highlighted
Responsive Resident
Responsive Resident

Re: Default Selected Item not updating in sharepoint list

Hi Sufiyan,

 

How are you saving data into sharepoint? Lets say you are using Patch formulae, that's the place where you put this formula to get the selected items of the combo box so that they will be saved in sharepoint.

 

Regards,

Pavan Kumar Garlapati

Highlighted
Helper I
Helper I

Re: Default Selected Item not updating in sharepoint list

@PavanKumar  Right now the DefaultSelectedItems Property of my Combo Box is set to [EmployeeID]

And I am confused where exactly you want me to put this formula? -"Concat(ComboBox1.SelectedItems, Value1 & ",")" 

 

Highlighted
Helper I
Helper I

Re: Default Selected Item not updating in sharepoint list

@PavanKumarWell Im a newbie so dont really know patch functions and all. I created this form through the sharepoint list directly. Any further elaboration you could provide please?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,583)