Solved

Sharepoint templates

Posted on 2016-07-28
10
44 Views
Last Modified: 2016-08-04
I have a few reports published to sharepoint but before doing so I manually update the Last Updated/Reviewed: date by going to Page/Edit Properties/Edit Properties. This is the only change I make but I have to make it to a few reports. Is there an easier way to do this using code?
Looks like it is in the forms directory ASPX file.. When I edit I am accessing EditForm.aspx?ID=117 if that helps.
Some of the fields are
Name
TItle
Comments
Category and so on...
Last Update/REviewed - is the field I would like to update using code on the day reports are updated.  Then it is Saved.

Is there an easier way to do this vs having to manually go in and edit this property?
0
Comment
Question by:Culwatrnca11
  • 5
  • 5
10 Comments
 
LVL 14

Expert Comment

by:SneekCo
ID: 41733643
This may be possible to quickly modify the fields using datasheet view of the document library. Otherwise, you could use a PowerShell script to modify the field.

Good luck...
0
 

Author Comment

by:Culwatrnca11
ID: 41733795
Any assistance with code would be appreciated
0
 
LVL 14

Expert Comment

by:SneekCo
ID: 41733844
Is this InfoPath?
0
 

Author Comment

by:Culwatrnca11
ID: 41734012
I think we may call it InfoSource on our end but it is part of Sharepoint they are just using ASPX templates I believe for the user end and file selection.
0
 
LVL 14

Expert Comment

by:SneekCo
ID: 41734032
It is probably InfoPath then. Keep a few things in mind, and this is just based on the above info.

The reports are probably uploaded to a document library. The created (date), modified date, and other metadata (data about the data) are columns of that document library. As you mention, when you go to the document library, select an item and click on edit, a page opens, which is named (unless it has been changed)m EditItem.aspx. If you select view, the page is DisplayItem.aspx, and you guessed it, a new item uses the page NewItem.aspx. So when you want to modify a report, the exact same page opens for every item, but the focus is on the selected item.

If you notice the url above, there is something like this in there:  ?ID=123 -- that means that one of the pages I just described above is opened with the focus being on that item. So in other words, forget anything about changing a page or each item having it's own page. Having said that, that means that the data you want to change is in the document library and it's metadata  (database) and that is where is should be changed. Doing it the way you described is not a bad way if you just have a few reports to do, that is going to edit item, open the edit page and modify the entry you need to update and saving the changes. As mentioned, there is a datasheet view that makes these type of change just as fast as if you were editing an excel spreadsheet.

If you want to do this with code, then what are you comfortable with, what language do you work with as far as SharePoint goes. There are some options, but just to change the values of a few columns it might not be worth the effort to code this. PowerShell would be your best bet.

Let me know what other questions you may have....
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:Culwatrnca11
ID: 41734045
Right now I am automating a few things using a combination of batch files, VBS, excel macros, etc..  I have a series of batch files that update, copy and zip the report as well as xcopy them to the sharepoint drive. If I can automate the last part which is change that date, this would be perfect. What used to take 2 hrs now takes about 30 minutes but the updating of the modifiy date is still manual. Any assistance would greatly be appreciated. I can apply this to a load of reports that are published on our infosource.
0
 
LVL 14

Accepted Solution

by:
SneekCo earned 500 total points
ID: 41734049
Here are two good links to get you started with Powershell, probably the best tool to use with SharePoint, especially for automation. (You may be able to use it for some of the other things you are doing too.

http://get-spscripts.com/

http://social.technet.microsoft.com/wiki/contents/articles/15894.sharepoint-2010-interacting-with-site-columns-using-powershell.aspx

This is also resuming that the date you are referring to in the modified by column within the document library, actually this presumes you are using a SharePoint document library. If that is not the case...

Nevermind... :-)
0
 

Author Comment

by:Culwatrnca11
ID: 41739575
SneekCo,

Going ot take some time today and look at the info you provided.
0
 

Author Comment

by:Culwatrnca11
ID: 41743026
Hi Sneekco,

Got swamped last minute and havnt had a chance to look the information over as of yet but this is a start so going to close this ticket and award points for assisting me so quickly.  Will open a new question as I move forward.. Thank you again, very much appreciate your time.
0
 
LVL 14

Expert Comment

by:SneekCo
ID: 41743032
You're welcome and thanks!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now