Thanks for the suggestion @v-xida-msft . I am currently trying to test this out and see if it works and will update when possible.
@mdevaney To give a little more information as you requested.
Collection 1 Contains data such as
First Name, Last Name, telephone Number, Job Title, Cube Number
Collection 2 Contains more specific location data
Cube Number, xCoordinate, yCoordinate, Height, Width
Collection 3 i am wanting to combine these two
First Name, Last Name, Telephone Number, Job Title, Cube Number, xCoordinate, yCoordinate, Height, Width.
The Location data from collection 2 feeds an interactive office map i am creating. so the x,y,height and width all represent a plotting system.
The only reason i am looking at combining collection 1 and 2 is that i think it would be easier to have all the data needed for any screen in one collection. As the data in collection 1 changes based on a employee the user selects on previous screens.
The idea is that as the data from collection 1 changes on each click the data in collection3 will update with all the new information.
So for example
On app start employee data is loaded into collection 1
Location Data from a sharepoint list is loaded into collection 2
Collection 3 is created from the data of collection 1 and collection 2 data is added based on the matching of the cube number column from each collection.
The app user then selects a new employee.
Collection 1 is cleared and the newly selected employee data is collected.
Collection 3 is cleared and updated with the new employee data plus new location data from collection 2 is matched and added to the collection.
I am not sure if this is the most efficient way of doing it. If there is a way to display data on my office map by matching the cube number column from collection 1 and 2 instead of making a third collection to merge the data.
Here is a snip of my on start action
//First Collect All Users
//ClearCollect(colAll, EmpListDir);
ClearCollect(colAll,ShowColumns(EmpListDir,"FirstName","Last_Name","FullName","JobTitle","Manager","WorkPhone","Email","Department","Division","OData__Location","SAOJobTitle","ImageURI"));
//Second Collect Current user from collection
ClearCollect(colEmployee, LookUp(colAll,Lower(Email)=Lower(currentUser)));
//Collect Map info
ClearCollect(colSeating,ShowColumns(OfficeLocations,"OData__Location","Height","Width","xCoord","yCoord"));
The OData__Location column in both lists is the cube number column that is a choice field is the sharepoint lists.
colAll is a collection that pulls all the data from the sharepoint list EmpListDir.
Collections are made from this colAll collection as i thought it would be more effient to pull the data from the sharepoint list once and then filter,sort, lookup from the collection instead of connecting to the sharepoint list each time.
I hope this provides a little more information