Pushing MySQL inserts to SharePoint 2013 lists - mysql

Long version, what I've read and tried so far:
I'm trying to optimize a weekly task for some of our users. We have a CMS build using Angular that uses MySQL to store entries that are now reviewed within the CMS after which they write an evaluation in SharePoint 2013 (on prem SQL Server 2012 on one machine, SharePoint 2013 on another server all in the same domain).
The goal is to have the MySQL entries show up in a SharePoint list as soon as they are created. I'd be highly preferred if the arrival of a new MySQL entry could spark a 2013 WorkFlow (send email, update webparts, log changes to task-lists etc).
The CMS currently does have NuSoap installed to feed a mobile application, but SharePoint Designer has some issue with reading all the fields from the WSDL and I read that this is one of the preferred methods to obtain pushed data into workflows, but I could not get SharePoint to usa the call http web service with success. Adding the WSDL as data source did only include the index and did not display anything in a webpart.
An alternative option was using ODBC on the SQL Server to grab the data in a SQL view from the Linked Server and copy the new entries over when they arrive. I have managed to make a view that can be used as External Content Type in SharePoint Designer 2013 and than can successfully be displayed in SharePoint as an External List.
Given the nature of the submissions, the content cannot be altered in the MySQL database. But I do want users to be able to add notes and other fields in SharePoint.
I found in two (older) Sources (the one on Stack Overflow) that it is not possible to fire a WorkFlow when using External Content Types, since "SharePoint does not own the data", but SQL Server does, so you cannot attach a workflow or have a workflow be notified when an entry is added.
==
TL;DR version
How do you make a "copy" of MySQL data from a read only source into a SharePoint 2013 List?
Neither the business data connection tools (web services as data source) nor the External Content Type solutions seem to result into a solution with default SharePoint List with attached Workflows.
For this specific solution push or frequent updates are required.

Related

Access 2013 locking other users out when linked to a Sharepoint list

I have an Access 2013 database that is stored on a remote computer. I do not have it set in a back-end/front-end setup. I have a SharePoint 2010 list linked to it as a linked table. I have 2 users that need to have access to the database at all times, others may need in it at a later date. When I link the table, only 1 user can be in the database at a time. Prior to adding the linked table, all users were able to use the database simultaneously. Now, after the first person gets into the database, subsequent users get the message:
The database has been placed in a state by user 'Admin' on machine '[computername]' that prevents it from being opened or locked.
For testing purposes, I tried creating a blank database that is connecting to that same table and tried to open it from another computer. I received the same error and all that is in there are the 3 tables needed for the SharePoint list.
Is there anything I can do to be able to have multiple users in my database again? I have full control to make changes as needed to the database, but I have no access to be able to change anything server side on SharePoint.
This is because of the 2010 SharePoint caching format.
You can avoid this behavior by going to Options -> Current database -> Caching Web Service and SharePoint tables, and untick Use the cache format that's compatible with Access 2010 or later.
Note that the different cache formats come with different features. The old (XML-based) cache format supports multiple users, the new (table-based) one doesn't. The old cache format can be taken offline manually and needs to be synchronized manually if offline, the new one automatically goes offline if SharePoint is unavailable and synchronizes automatically as soon as SharePoint becomes available. The new one supports adding fields in table view, the old one doesn't.
Through VBA you can mix caching formats for different lists, but that's generally not recommended.

Sharepoint and Database interaction, what should I do?

I've developped a MySQL database containing informations about different documents and products. Now I have to create a user interface which has to be integrated in a sharepoint. As I'm new to sharepoint, I am a bit lost and I don't know what I should choose (developping a Web Application on visual studio which will be hosted on Sharepoint, developping a WebPart...etc I have no idea of what to do).
So my question is : What's the best option to develop this user interface on Sharepoint ?
Thanks
You can go different ways:
Push data from your MySQL database to SharePoint list periodically or event-based.
In this case you already have UI interface of SharePoint list view. If out-of-box UI not enough then you can create your own using javascript or by creating your own web part or by creating SharePoint add-in.
You can do it many ways:
1.1. C# console app (create with Visual Studio). Console app will connect to your SQL database and create list items in SharePoint list. You can schedule this console in Windows Task Scheduler.
1.2. Another periodically running code that external to your database. May be PowerShell script, SharePoint timerjob, Windows service, SharePoint workflow or something else. This code will connect to database and push data to SharePoint list.
1.3. I don't know how you fill your database but in your logic you can add logic to also create SharePoint list item in list when you add record to database.
It is event-based logic.
Get all data from your database in SharePoint on page load each time.
Add some web part to SharePoint that get data from your database on page load (you can mix some parts below to get intented behavior):
2.1. Create your own Visual Web Part in Visual Studio. Deploy solution with web part to SharePoint. Add web part to any page in SharePoint.
This web part will get data from your database on page load.
2.2. You can create web service hosted anywhere (SharePoint, another place) that return data from your database.
Create javascript logic that call this web service to get data and render data.
Add this javascript logic in Content Editor or Script Editor web part in SharePoint. CE and SE web parts is out-of-box web parts, you don't need to develop this.
2.3. Create SharePoint add-in that will get data from web service.
2.4. etc ....
May be I can suggest other options if you specify more precise requirements to implementation.
Just say how you see it in your imagination and I can suggest ways how to implement it.
Describe how it must be from user experience. Like 'I see page where I have three green buttons, color highlighted rows, auto-calculated field and so on and so on. I click button and get following result... ". Describe your expected user experience.
About trends - javascript rules now. In SharePoint Online you cannot create server code solutions hosted in SharePoint.
Best solution to use javascript to not change many things on migration to different version of SharePoint.

Table WorkItemsLatest (TFS 2010) missing in TFS 2015 (Collection Database)

We recently migrated from TFS 2010 to TFS 2015 and came across that some of the reporting services are not working anymore.
One of the view we created was pulling various information (WorkItem State, Title,Fld10118) from "WorkItemsLatest" table, however, checking the collection database of TFS 2015 indicates that there is no more "WorkItemsLatest" table in TFS 2015 collection database.
I would appreciate if you can advise how to get above mentioned fields in TFS 2015 collection database. I understand that the operational databases are not supported by Microsoft and encourages to retrieve data from Warehouse database, however, we would like to retrieve this data and will allocate some development time in the future to ensure that data is retrieved from the Warehouse database.
WARNING
Even though you've already mentioned this yourself, querying the database tables directly can lead to breaking functionality between updates. With the recent amount of churn in the work item space (new template customization features landing on VSTS and probably coming to TFS vNext and the new workitem form), expect these items to keep changing in the near future.
Ok, I get it
So, you're probably looking for the following two views:
[Tfs_DefaultCollection].[dbo].[vw_denorm_WorkItemCoreLatest]
[Tfs_DefaultCollection].[dbo].[vw_denorm_WorkItemCustomLatest]
And join them with tbl_Field to be able to identify which Custom Field ID matches which Field Name.

MS Access + Sharepoint LInked table with Multi-value field convert to Local Table

Using Access 2013, Sharepoint 2010 OnPremise
I have an Access database that uses Sharepoint 2010 for a back end using Linked Tables.
A few months ago there was a request to have a field contain multiple values, and I stupidly implemented that change, not fully understanding all the issues behind that. Initial research lead to it being "ok" for Sharepoint Lists.
Due to the company architecture, this application needs to be accessible on a Kiosk machine that doesn't have access to the Sharepoint site, but still is connected to the internet.
If the computer runs the application while connected to the internet it will hangup/stall when opening because it's trying to resolve the connection of the linked tables or trying authenticate.
But if the computer runs the application while not connected to the internet it will operate as it should in an offline mode. All data is accessible.
Since we can't/don't want to disable the internet of the Kiosk machine the solution was to convert all the Linked Tables to local tables and issue it to the machine that way.
But now a few months later when trying to make the offline mode application we get the following error:
You cannot enter that value because it duplicates an existing value in the multi-valued lookup or attachment field
I think it has to do with that multivalue field, which has turned into a huge headache, but can't be undone for at least a couple more months.
The Offline mode functionality was created long before the multivalue change, unfortunately that part of the application wasn't tested against this changed field.
So I need to know if there's a way I can convert the table, or if there's another way to Force Access 2013 into an offline mode.
Thanks,
Dennis

Sharepoint MsAccess synchronization

HI!
Does anyone have any idea how to synchronize MS Access data to SharePoint portal. I would like to link both of this together and trigger a workflow upon receiving a new data entry.
Hope you could advice on it.
Thanks!
In Access you can have so called "linked tables". You can have access linked tables with a Sharepoint installation. In Sharepoint this linked table manifests itself as a regular list, so you can have a workflow trigger on each new item created.
There is a nice tutorial here: How to Link SharePoint Server 2007 Lists with Microsoft Access 2007 and for Sharepoint 2010 and Acccess 2010 Microsoft hast written something nice: Synchronize a SharePoint 2010 list with Access 2010.
Additionally let me show you some Screenshots from Access. When you go to External Data > Export > Sharepoint List (see next screen)
When you click on that button you get the following dialog where you can select where to export your table to:
The same dialog you get when you Right click on a table, go to Export > Sharepoint List.
Now if you want to synchronize your data, you need to link that created Sharepoint list to your Access DB. So you click on External Data > Import > From Sharepoint List and you get the following dialog:
When you have a linked table it is synchronized with Sharepoint.
I think you are looking for this article.
http://office.microsoft.com/en-us/sharepoint-designer-help/add-a-database-as-a-data-source-HA010100908.aspx
Basically, you need to create a new Data Connection Library (pick from the Library list in the "Create" page). And then follow the steps depending on the connection method (i.e. Single Sign-On, custom connection string, or user id/password).
The process involves migrating your access tables to SharePoint. So if you moved or migrate a table in Access to SharePoint AND THEN choose to link the table, then it is a live connection to SharePoint. This is a bi-direction synnc of that table. So any change in Access (any update to that linked table) will see changes sent to the same table (list) in SharePoint. This is a VERY different process then trying to sync a whole file. So power-point files, or even a Access file does not work well at the FILE level, and you don't get any kind of multi-user setup.
However, if you migrate the tables to SharePoint lists, then any sql query you build in Access against that linked table will work just fine. And that includes append query, update query, or just a select for data.
And you can even work against these linked tables in off-line mode. This means that you can continue to update the tables even without network connection. When you do finally get wi-fi or some internet connection, then the data will auto-sync (both ways) and tables will update missing or changed data.
Note that you can even migrate and maintain related data, and SharePoint now supports relations and maintains those relations for you (referential integrity between tables is supported when using Access 2010 (or later) and SharePoint 2010 (or later).
VERY careful steps are required to migrate related tables. Access will migrate and send related tables of data to SharePoint (and maintain the relations for you). You simple have to ensure that your relations are of a type that SharePoint supports.
This means your PK has to be a autonumber ID type, and the foreign key has to be standard long data type. Since this setup is the vast majority of Access relationships, then these types of related tables move rather well to SharePoint. However, if you PK/FK setup is say a string, then such relationships don't work in SharePoint.
The other issue is to keep in mind that performance issues can arise when the row count exceeds 5000 rows when using Office 365 or hosted SharePoint. If your SharePoint system in on-premises then you can turn off some of these limits.
Migration of related data tables is easy, but you need to ensure you setup the relationships using the table lookup wizard in most cases. Sometimes you can use the relationship window, but in most cases, you need to re-build the relationship in a correct way BEFORE you migrate the tables to SharePoint. If your don't have related data, and just a few tables, then you don't really have to do much of anything in Access before you migrate such tables.
As noted, once migrated to SharePoint, then any sql query you execute against such linked tables will work fine. So no need to update the table local, or on SharePoint - the whole process is fully automatic and synced for you.
This video shows how to migrate related data tables to SharePoint if that is your requirement:
https://www.youtube.com/watch?v=3wdjYIby_b0&t=0s&list=PL27E956A1537FE1C5&index=3
Edit
Given that the tags are for SharePoint 2007, then you will find that access 2010 (or later) and SharePoint 2010 (or later) is required for referential integrity to work. And pre Access 2010, you find performance of linked lists to be rather slow, and table row counts needs to be keep small. (under 10,000 rows).