Solved

Sharepoint templates

Posted on 2016-07-28
10
58 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 18

Expert Comment

by:Walter Curtis
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 18

Expert Comment

by:Walter Curtis
ID: 41733844
Is this InfoPath?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 18

Expert Comment

by:Walter Curtis
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
 

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 18

Accepted Solution

by:
Walter Curtis 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 18

Expert Comment

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

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
File size limit in SharePoint 2010 5 57
Licensing Sharepoint 2016 for developers 11 95
Icons on a page, side-by-side 6 54
Sharepoint Online 5 118
Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…

734 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