0

Hi im new to sharepoint and i have a very simple problem that i can't do.

I have a products list on my parent site and an orders list on my subsite.

Now i created a site column look up so i can share the products list to my orders list in my subsite.

Now from my orders list i have a quantity field that is needed to be multiplied to the price(the products list has price and item name fields) of the product that is selected item.

I know that you can do calculated column with a lookup value and upon my research the workaround that most people say they did was to create a field in the subsite that will be the holder of the look up value that is needed for the calculated column(in my case the price from the products list from the parent site). Now to do that they said that they use workflow, so upon adding a new item would populate the price value to the look up field.

I've manage to do that but the set up is that the 2 list are on the same site.

And in my case i needed it on different site.

How would you do this?

Thank you!

  • It doesn't matter if it is the same location/site. You can do cross sites coping data with rest api call. If you are using Workflow2013 you can easily do that. There are dozens of examples on internet step by step even. – Danilo May 15 '18 at 8:22
0

The best way would be to write some javascript and get additional data from your products list:

The easiest way would be to use: GitHub - sympmarc/SPServices: SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install. https://github.com/sympmarc/SPServices

You can use this method: SPServices/GetListItems.md at master · sympmarc/SPServices · GitHub https://github.com/sympmarc/SPServices/blob/master/docs/core/web-services/Lists/GetListItems.md

or you can go with plain javascript and SP.List.getItemById method: SP.List.getItemById Method (sp.js) https://msdn.microsoft.com/en-us/library/office/jj246019.aspx

You can get ID from you lookup column or selected item value in your lookup dropdown.

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.