Avatar of Culwatrnca11
Culwatrnca11
Flag for United States of America asked on

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?
Microsoft SharePoint

Avatar of undefined
Last Comment
Walter Curtis

8/22/2022 - Mon
Walter Curtis

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...
Culwatrnca11

ASKER
Any assistance with code would be appreciated
Walter Curtis

Is this InfoPath?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Culwatrnca11

ASKER
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.
Walter Curtis

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....
Culwatrnca11

ASKER
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.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Walter Curtis

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Culwatrnca11

ASKER
SneekCo,

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

ASKER
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.
Walter Curtis

You're welcome and thanks!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy