2

I'm a newbie at SharePoint and I was wondering what was the best way to implement this:

I am creating subsites under a site collection using a web form and JS plus the REST api. Basically, what I need is to 'tag' each subsite with a set information or metadata like 'Contact Name', 'Type', etc. from values entered in my form.

What would be the best way to do this with the REST API? I need to list all the subsites later and display all these metadata identifying a particular subsite and be able to do a search on the metadata provided so I can get a filtered subsite list. Thanks!

0

2 Answers 2

0

Recommend you look at "Property Bags" that are indexed for search. Setting property bags is pretty simple with REST or CSOM, making them index-able is a bit trickier. You can set the property bag value to get crawled by search, then set the value to one of the Refinable Strings (e.g. RefinableStr00 in Search Schema Properties).

Haven't figured out how to do the indexing yet in O365, if you are on-prem there are plenty of tips for doing it server-side if you just google "Indexed Property Bags in SharePoint"

1
  • Thanks! I am going to see if this will work for my requirements. I see how you can set this with CSOM but do you mind sharing how you can do this with REST? I assume it's a parameter in the JSON being posted?
    – Nimrod P
    Commented Mar 13, 2014 at 4:17
0

Property bags is not an incorrect answer, but I would either put the metadata on a list in the new site, or in a centrally available list.

Also, the new Office AppModel Samples has an example that changes the new site link to a custom page/app that can collect the data and update the list I've described.

1
  • Thanks for that link! I will try using a list as well. It might be more maintainable than the properties but I'll explore both options.
    – Nimrod P
    Commented Mar 13, 2014 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.