1

Inside sharepoint on-premises 2013, when working with sharepoint lists, i receive many requirements, such as:-

  1. To have 2 cascading drop down fields. for example (Main Category + Sub Category)
  2. To have a field set to mandatory only if another field is entered.
  3. To have an advance search for the list, with the ability to apply search on number fields by defining greater than or less than.

Now to achieve the above inside SP on-premises, i do these things:-

  1. For the cascade drop-down fields. I define 2 separate lists, with a lookup columns between them. for example i create a list named MainCateogry, and anther list named Sub-Cateory with a lookup column referencing the main category list.
  2. Then I create 2 drop-down fields. one field containing all the main category options (as defined inside the MainCategory list) + another field containing all the sub category options (as defined inside the SubCategory list). then i add a script inside the create/edit list forms, which will retrieve the relation from the main/sub category lists and populate the subcategory drop-down column accordingly, based on what the user select for the main category drop-down. so if user select option ABC for the main category >> the script will query the subcategory list and retrieve all the items which are associated with the ABC item >> then it will populate the subcategory drop-down accordingly.

  3. For setting a field as required in-case another field is entered, i also add a script tot the create/edit forms and i define the validation inside the PreSaveItem(){ function.

  4. Last point, for the advance search i enable metadata navigation for the list and it will show an advance search for the list.

But now we have moved to SharePoint online, and my above customization will only work on classic UI. while on mdoern UI it will not. i know that in modern UI the way to customize the list forms is to use PowerAPP. but even if i chose PowerApps we will lose the ability to have an advance search, where the modern UI filtering is useful but does not provide the same advance search we get inside the metadata navigation. so for now inside our SP online i define to render all the lists which have the above customization in classic UI, as follow:- enter image description here

but my question is if my appraoch is valid/recommended/future-proof, in-respect to these 2 main points: 1. forcing the list to render inside classic UI. 2. doing the customization on the list forms by embedding scripts? mainly to define a cascade drop-down fields + conditional mandatory validation?

1
+50

You can still work with classic pages and scripts when you can't use OOB features, because there isn't a plan to deprecate classic pages.

https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations

However, when it's possible, the best way is to customize SharePoint creating apps, for example using SPFx.

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview

  • This will depend as well on your company policy. Current Guidance from MS is to block the script web parts and any customization to be delivered using SPFX model. That gives admins greater control over the customization sprawl. – Marek Sarad Mar 14 at 12:48

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.