1

I have a parent list called called Items List residing on parent site containing columns as Site and Workspace. I created a Site Lookup column and named it as 'Workspace' which references Workspace column from the Items List. Then I am using this 'Workspace' site lookup column in Documents library on subsites under parent.

I have about 5 subsites under root. The Site column in the Items list contains these subsite names like Site 1, Site 2, Site 3, Site 4, Site 5 and relevant workspace names are stored in Workspace column. Below is the screenshot of the list.

enter image description here

Now the challenge is let's say if I am working on Documents Library (It has Worksapce added from existing site columns) under subsite Site 1 then in the Workspace drop-down, I would only want to see Workspace names that are relevant to Site 1 which are Workspace 1, Workspace 2 and Workspace 4 and others should be hidden. Similarly If user is working on Site 2's documents library then he/she should only see Workspace 6 in the Workspace drop-down. So this should be dynamic in nature, like if anything changes in the Items list, the drop-down should account for that.

I already achieved this using SPServices but unfortunately I won't be able to proceed with it since it was not approved as a solution. I have to somehow achieve this using JavaScript or JSLink since I am working with SharePoint online, please help with the code. Thanks in advance.

2

If creating an SPFx webpart is part of your solution, then there is a tutorial explaining just about that for a web part property pane.

Later on, you can probably make a combination of the React List Form Webpart and the cascading properties effect to make your own SPFx web part.

  • Hi Deepu, I am not looking a solution for Modern UI, it has to be for classic SharePoint. – mdevm Jul 17 '18 at 2:15
  • No worries. I can suggest this article - kogzee.wordpress.com/2014/11/11/… - to try with JSLink. I haven't done this before, so please try it out yourself. – Deepu Nair Jul 17 '18 at 2:38
  • Thanks Deepu, the only issue here is the drop down does not show pre-filtered options based on what site user is working on, users will have to type and look for it which is not ideal. ANy other suggestions using JS? – mdevm Jul 17 '18 at 10:05

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.