0

"I need to show 2 lists (contracts + Finance ) in the same view."

Below I've 2 custom lists:
1-Custom List "Contracts" and 2-Custom List "Finance".

Both were in Excel and I imported to SharePoint via import XLS feature. Now the idea is that we show the data of both lists in 1 view. The key field is ContracID in both lists.

  • Contracts list is static they can add/update/delete etc via SharePoint.

  • Finance Lists should be every 2 days (3 x p/week) refreshed. I mean, the Finance list will be deleted physcially and re-created via "Import XLS", because the amounts are changed everytime. Finance data is coming from other System. so they don't or may not change the Finance lists either in sharepoint.

I did:
I created the same "Finance list fields" in "Contracts list" and used eventreceiver which works fine, but when I delete the Finance List and re-create the Finance list for import, the Eventreceiver is not working. Copy/Paste records is working, but I only copy 30-40 items and I have almost 2000 items in Finance list.

So how can I show the 2 lists in the same view. They may only edit the Contracts fields and not the Finance fields. I think I can fix this with permissions.

Please advice how to fix this. Please do not send me just 1 word or a link, but also specify in human words or explain a bit which helps me for further googling.

List Contracts

ContractID
Name
Adres
... and other fields


List Finance
----------------
ContractID
Amount1
Amount2
Amount3
... and other fields

  • No straight forward solution that I can think of. You can google for Custom Data Views but I never managed to get them work properly. Another option is adding fields like Name, Address in to your lookup field in Finance list that looks up Contracts. You just need to remember not all fields are possible to pull using lookup, so you might need to move some fields to their Single Line of Text counterparts using workflows. Challenge here is that, since you delete the list every 2 days, lookup field needs to be recreated. And ContractID needs to be the actual list ID of the contract. – Charles Mar 3 '16 at 14:43
  • 1
    Built your own Items in a Contracts View with CSR (Client Side Rendering) each contract can then read the items from the Finance list.. better yet.. in the CSR OnPreRender function read the whole Finance list in one JSOM or REST call so you have all items in memory ready for each Contracts item to display. – Danny '365CSI' Engelman Mar 3 '16 at 14:49
0

It might be easier to use MS Access to load the 2000 items in the finance list, I've had a lot better luck with Access than Excel. In MS Access under the EXTERNAL DATA tab, the export section has a 'More' dropdown with SharePoint List as an option.

I'm not sure why you couldn't add a web part to the webpage with a connection based on the 'ContractID'. Then when editing the web part, select 'No Toolbar' under Toolbar Type.

| improve this answer | |
  • can you please give more details about WP connection based ? How does that work? Which is that? – user3080110 Mar 4 '16 at 14:29
  • Under Site Contents, choose site pages and add new. You can call it whatever you want and add a description, but load the page and select edit. On the ribbon under insert choose add web part and select the List Contracts. SP will add it to the webpage and if you hover over the web part you can select the checkbox in the top right. On the ribbon you should now have a web part tab and under it is Insert Related List. Select the Finance list and use the 'ContractID' as the source and consumer, since you have the names the same, when you get the popup. Use the far left 'Select' column to filter. – DigiZen Mar 4 '16 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.