cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
urbanclearway
Frequent Visitor

Combo box won't save to sharepoint list lookup column that refers to the same list

I have a list for generating URNs (Unique Reference Numbers) to keep track of the version of documents published across different websites on different platforms. The list includes metadata about each document. There can multiple versions of a document published over time, with metadata changing with each publication. So each row is a version of a document.

 

Each row has a lookup column, 'previous version', which refers to another row in the same sharepoint list.

 

This works fine in sharepoint, if you edit in the grid view it will save a reference to the previous version of the document in that column.

 

To make life easier for the end users I have customized the forms in Power Apps.

 

When users create a new version of a document there's an option to select the previous version of the document from a combo box; this then pre-populates other fields, eliminating user error when entering details shared between documents e.g. the document id underlies the URN.

 

The combo box populates without problem, and I can pull the values for that record that I need.

 

My problem is that I can't get the form to save a reference to previous version in the 'Previous Version' lookup column; the URN is the value of the column.

All other values save without problem.

In edit mode the Combo box will display the correct value (when set in grid edit) — though it won't save it back to the list. And in view mode the reference (URN) displays without problem too.

 

I've been trying to patch the combo box, but without success.

 

Anybody have any ideas please?

 

Thanks

2 REPLIES 2
ricardox180
Resolver I
Resolver I

Hi @urbanclearway , for save a lookup field you can use:

Id_Lookup_Field:{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
Id:LookUp('SP List', ID=Dropdown1.Selected.id;
Value:Dropdown1.Selected.Name
}

Hope it helped you

If this post answers your question, please mark my post as a solution!
If you like my post please click thumb up

Hi @ricardox180 sorry for not replying sooner. Thank you for taking the time to help me. I'll be honest, I couldn't it work. As an unlocked datacard it would save, but then I couldn't get the values I needed from the selected item. Unlock and I can get the values, but can't save.

So I'm just working around it. Which seems to be what I constantly have to do with SharePoint lists and Power Apps. I'm used to proper web dev and programming languages, platforms and frameworks. In comparison, SharePoint and Power Apps are endlessly frustrating.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (76,132)