Does Sharepoint not store column data in Office documents as custom properties? - delphi

(I develop in Delphi XE7, edit documents locally in Office 2010 and use SharePoint through a corporate Office365 account.)
I have developed a Delphi program that modifies Word 2010 document properties and even filters and orders them by their properties. The folder where the document was stored is a network folder. The only problem is that this is slow for some colleagues in countries other than the folder location.
I thought that by moving the relevant folder to a Sharepoint server and syncing it with a local folder through OneDrive, I could overcome that issue. Also users could choose between the two interfaces, the Web Browser having access to the Sharepoint server or the Delphi program working on the local folder, changes done in one location being synched by OneDrive with the other location.
I made columns in the Sharepoint library matching the Word properties and initially Sharepoint recognized all properties and made nice lists with them.
The problem is that subsequent changes of the properties are not transferred from one place to another.
If the change is done through the Delphi program in local PC, I have overcome the issue by cheating Sharepoint: instead of simply saving a document, the Delphi program copies and pastes the contents into a new document, where the properties are saved and automatically transferred into Sharepoint columns.
But I have not found a workaround when the change of properties is done through Sharepoint…
Apparently, Sharepoint does not store the column data in the document itself, as custom properties. In fact, after downloading the document it still shows as properties the former values, not the ones showing up in Sharepoint.
Should I give up with my intention of changing properties either locally or through Sharepoint?

It turned out that the Server properties are actually stored in the Office document itself but in a different location. Physically, each type of properties is stored in different files of those that are compressed in a .docx file: custom properties come in the file "docProps/custom.xml", whereas server properties come in "customXml/item3.xml", being referred to with an "internal name" that fills the spaces between words. But anyhow, as noted in some threads here, programmatically server/SharePoint properties can be modified and retrieved through VBA with the collection ContentTypeProperties.

Related

Updating Access DB form linked excel file

I have an Access DB which is linked to an Excel file. The excel file is linked to a SharePoint List. Whenever a change is made in the SharePoint List, the Excel file reflects the change and this change is also reflected in the Access DB. However, when I open the Excel in Read Only mode, the changes from the SharePoint List are reflected in Excel, but not in Access DB. Is there a way to overcome this (update Access linked table when Excel is opened in Read Only)?
Tried changing IMEX to 0 and 1, but didn't work.

Microsoft Graph API SharePoint Files Search

I try to search for files on SharePoint Document Library (e.g. the default 'root'). I created a few test-files by uploading them or create new Office files online and made some search-requests, e.g. https://graph.microsoft.com/v1.0/sites/root/drive/root/search(q='{query}') and until yesterday everything worked fine.
Now I started to edit files on SharePoint or created/uploaded new ones and with this edited or new files, I have the problem that I get no result when I search for them. "old" files, I created when I started I find although, as long as I don't edit them.
To get access I registered an App inside the AAD and gave it the needed permissions (
Sites.Read.All, Sites.ReadWrite.All, Files.Read.All, Files.ReadWrite.All
and a direct access to a specific file with https://graph.microsoft.com/v1.0/sites/root/drive/items/{item-id}/ works also well.
Search will read data from indexed data, but crawling and re-indexing of a library need to take some time. So you the code return null for the new files:
https://graph.microsoft.com/v1.0/sites/root/drive/root/search(q='{query}')
The following code get the library data directly but not based on the indexed data, so it works well.
https://graph.microsoft.com/v1.0/sites/root/drive/items/{item-id}/

Umbraco Database Query

I want to add a property for a document type in Umbraco. After that, I want to add content using the newly edited document type. Finally, I want to edit the property value of the content and save it into the database. I want to do this using a SQL command in SQL Server Management Studio, given that I have installed Umbraco and I can access the Umbraco database.
You shouldn't do these things directly in the database with Umbraco. In fact, part of your requirements (adding content) wouldn't display on the front end if you did it in the database, as doing so would not fire the events needed to add your new content to the site XML cache.
Ideally you should be doing this in code, using the API. You don't mention which version of Umbraco you're using, so I'll assume the latest (7). That being the case, you ca use the various service APIs to accomplish your requirements. You'd use the ContentType Service to create your new Document Type, and the Content Service to add the content of your new type.
For more information, refer to the Umbraco services reference page: here
As Tim says it's not a good idea to do this with SQL, an alternative solution is to do it with a package. An Umbraco package contains an XML document, it is also possible there to make an adjustment in the XML (if the goal is a generated change)

Sharepoint's "New Folder" doesn't ask for a required field

I am using Web Part Connections to filter documents in a documents library in SharePoint. To do this, there's a column that is required, which I've named "related contact." Here's my problem: When I go add a New Folder (instead of just a document) SharePoint only asks me for a title for the Folder. The "related contact" column (which is required for the documents) doesn't even appear. Since the info on that column is empty, web part connections doesn't see the folder at all. Is there any way to make the Folder ask for another field at the time of creation?
Thanks
-V
Did you try creating a new folder content type with those required fields and trying to use that (and perhaps turn off the standard folders)?
Perhaps this page will help you: SharePoint folders and metadata.
Folders are one-dimensional. They are virtual containers for your documents, but aren't objects in your library that contain actual metadata.
Instead of using folders, I would recommend adding a column to your library that would mimic the names of the folders. From there, you can sort/filter/group/query the contents of that library. If users are sticklers for the folder structure, you could create a View that groups the documents by that new column, which would give you the appearance of folders.

See images in SSMS?

I was browsing around and found this blog post:
http://erikej.blogspot.com/2010/04/version-3-of-exportsqlce-now-available.html
(It is for a great add in if you user SQL Server CE.)
On that post I saw an screen shot of SSMS with images in the results.
How is this done? I have images in my database (PNG files that are serialized via memory stream), but I just see numbers when I select the image column.
If you are asking how this is done, I'm not sure how it is implemented exactly. I know that you can create ssms plugins in visual studio, and I'm sure that there is a way to take a filestream object and decode it.
If you are looking for a way for you to do this besides the plugin you mentioned, there is a great freeware plugin I use. You can find a plugin ssmsboost at http://www.ssmsboost.com. This plugin has a community version and a pro version. The only difference between the two is that the community version needs to be renewed every 120 days. This plugin has a lot of nice features, but the one you're asking for is
SSMS Results Grid Visualizers:
Feature allows to export & view files or some big amounts of text or XML data from tables (like files from document storage of sharepoint services). Required data should be simply output to ResultsGrid. By right-clicking the cell with required value and selecting "Visualize As->.." you can tell to save data to file with predefined name and open it with custom or default application. No matter than SSMS truncates long data from VARBINARY/VARCHAR fields when outputing them to ResultsGrid: SSMSBoost works with internal storage of SSMS and extracts complete cell value. Below you can see how a picture from [LargePhoto] field of [Production].[ProductPhoto] table from [AdventureWorks] database is being visualized:
I'd like to recommend the MiniSQLQuery browser that is free and opensource to achieve this.
http://minisqlquery.codeplex.com/

Resources