#StackBounty: #sharepoint-online #development #custom-form #list-form #modern-experience Inside sharepoint online is it still a valid/r…

Bounty: 50

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?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.