Solved

Sharepoint templates

Posted on 2016-07-28
10
54 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 16

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 16

Expert Comment

by:Walter Curtis
ID: 41733844
Is this InfoPath?
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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 16

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 16

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 16

Expert Comment

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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. …
I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

776 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