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 / Append new value witho...
Power Apps
Unanswered

Append new value without ID from collection to lookup column

(0) ShareShare
ReportReport
Posted on by 103

Hi all,

 

I need to append a new value to a multi-value selection lookup column. The challenge is how to get the IDs of the new values in one SharePoint list and append them to another SharePoint list with new item.

The user creates new items in the collection. He starts with the manufacturer, then the model and creates and appends the controller.



(1) Create new items

 

Creating new manufacturer:

 

Collect(colManufacturer;
 {
 Manufacturer: Upper(txtManu.Text);
 New_entry: true;
 Category: "Manufacturer"
 }
);;

 

Creating new model:

 

Collect(
 colModellseries;
 { 
 field_2: txtModellserie_2.Text;
 ElevatorManufacturer : {
 Id: varManuSelected.ID;
 Value:varManuSelected.field_2}; 
 Category: "Modellseries"
 }
);;

 

Create new controller:

 

Collect(
 colController;
 { 
 ControllerManufacturer:{Value:ControllerManuSearchView.Selected.Result};
 ControllerType:txtControllerLib_Modell.Text;
 ControllerArt:{Value:Radio_Art_3.Selected.Value};
 EleManufacturer : {
 Id:varElevatorManufacturerSelected.ID;
 Value:varElevatorManufacturerSelected.field_2};
 Category: "Controller"
 }
));;

 

 

(2) Bulk import after workday 

 

Now after the workday, the user wants to bulk upload each newly created item and have the right relationship in the sharepoint.

 

Here is my attempt:

 

// Bulk upload
// patch only blank title values from collection

//Ingest NEW Manufacturer & get ID Value
Set(gblLastManuPatched;ForAll(Filter(colManufacturer; 
Not(!IsBlank(Title)));
Patch(ManufacturerLib;
Defaults(ManufacturerLib);{
 Manufacturer:Manufacturer
})
));;

//The same for Model as Manufacturer

//Ingest NEW Controller & get ID Value & set Relationship right
Set(gblLastControllerPatched;ForAll(Filter(colKontroller; 
Not(!IsBlank(Title)));
Patch(ControllerLib;
Defaults(ControllerLib);{
 Title:Last(ControllerLib).ID+1;
 ControllerManufacturer: ControllerManufacturer;
 ControllerType: ControllerType;
 ControllerArt:ControllerArt;
 //HERE I NEED TO GET LAST ID FOR RELATIONSHIP
 Manufacturer: {
Id:gblLastManuPatched.ID; 
Value:gblLastManuPatched.Manufacturer};
 Modelseries: Modelseries;
 Compatible:Compatible
})
);;

 

 

I think I need to use Set() with Filter() and ForAll(). I thought also to use make a new collection which stores the record back ID of new items.

(1) Save item to the collection
(2) Save new items with the new ID corresponding to the record ID (in a new collection?)
(3) Use the new ID of the element and use the corresponding ID for the correct relationship between the others.

 

Any help will be greatly appreciated.

Categories:

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard