0

One of the Requirements I am working on right now, I am using a SharePoint list form to create sharepoint sites with a template. The form also has fields like Asset URL, Stage (choice column with choices: Development, Transition and Property), Template field and an Asset Description field. Please see below screenshot for the form.

Site Requests Form

its the OOTB form I am using from a SharePoint list and using JSOM code, when clicked on save it creates a site and redirects me to that site's landing page. Please note that I am passing the Stage Value in the Asset Description field. So based on the values entered in the above form, when i click on save in the form and check the site description of the created site, it would look like below:

Site description

So now what I wanna do is, the site that gets created has a promoted links list with four links(part of the template), which I am showing in form of tiles on the landing page of this newly created site. Please see below screenshots for reference.

Library Links

Below is how the site's landing page would look like:

Landing page

The challenging task is when a Site Description field of that site is updated to keyword Property, I would like to hide 2 list items from this promoted links list. I have a JSOM code that updates the site description field when a user changes the Stage Column value from either Development or Transition to Property using another collaboration list. So the site description field will be updated once in a while to something like: Property;Testing out the site provision (considering above example I gave). So when this happens I would like to hide Listitems with title Acquisition and Approvals. Maybe ID can be used here to hide the list items but not sure how to do it.

Please help me about a JSOM solution for this as I am working with Office 365/SharePoint online. Thanks in advance.

0

why don't you change the promoted links to normal html links or buttons that can be hidden on event, and attach the event to the previous control using jquery ?

Edit:

To hide a promoted link tile:

replace "#Tile_WPQ3_2_1" with the id of the tile you want to hide to find the tile ID i would recommend use the browser inspector.

$("#Tile_WPQ3_2_1").style.display="none";

you will still need to attach this piece of code to an event.

  • I want to leverage the OOTB SharePoint tiles because that's what client is willing to see. So can't go that route. Thanks. – mdevm Apr 13 '18 at 14:07
  • hope this helps : $("#Tile_WPQ3_2_1").style.display="none"; – Mike Apr 13 '18 at 14:42

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.