Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 66
  • Last Modified:

Sharepoint templates

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
Culwatrnca11
Asked:
Culwatrnca11
  • 5
  • 5
1 Solution
 
Walter CurtisSharePoint AEDCommented:
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
 
Culwatrnca11Author Commented:
Any assistance with code would be appreciated
0
 
Walter CurtisSharePoint AEDCommented:
Is this InfoPath?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Culwatrnca11Author Commented:
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
 
Walter CurtisSharePoint AEDCommented:
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
 
Culwatrnca11Author Commented:
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
 
Walter CurtisSharePoint AEDCommented:
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
 
Culwatrnca11Author Commented:
SneekCo,

Going ot take some time today and look at the info you provided.
0
 
Culwatrnca11Author Commented:
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
 
Walter CurtisSharePoint AEDCommented:
You're welcome and thanks!
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now