A good cup of coffee is enough to make my day.
Coffee Journey
Island Plaza (near ground floor entrance),
Tanjung Tokong
Monday, March 3, 2014
Sunday, March 2, 2014
C# Update InfoPath by passing in the XPath
C# code snippet to update the InfoPath XML file in a SharePoint library.
Sample parameters:
websiteUrl: http://sharepoint
library Name: InfoPath Library
list Id: 1
xpath: /my:myFields/my:Employees/my:Employee[my:ID='123']/my:Location
value: San Jose
What it does:
In the repeating group Employees, locate the employee whose ID is 123, and update the location to San Jose.
Sample parameters:
websiteUrl: http://sharepoint
library Name: InfoPath Library
list Id: 1
xpath: /my:myFields/my:Employees/my:Employee[my:ID='123']/my:Location
value: San Jose
What it does:
In the repeating group Employees, locate the employee whose ID is 123, and update the location to San Jose.
Labels:
.NET,
infopath,
sharepoint
Thursday, February 27, 2014
SQL Server change schema to dbo for TABLES and STORED PROCEDURES
Oops... so you mistakenly created some tables , etc, without specifying it belongs to dbo. It's fine, here's a very quick way to remedy it!
SELECT 'ALTER SCHEMA dbo TRANSFER ' + TABLE_SCHEMA + '.' + TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'oldschema'
SELECT 'ALTER SCHEMA dbo TRANSFER ' + TABLE_SCHEMA + '.' + TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'oldschema'
SELECT 'ALTER SCHEMA dbo TRANSFER ' + ROUTINE_SCHEMA + '.' + SPECIFIC_NAME
FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE='PROCEDURE' AND ROUTINE_SCHEMA = 'oldschema'
Copy and paste the results in Query Analyzer and run.
Labels:
sql server
Wednesday, February 26, 2014
AgilePoint C# API: Updating a custom attribute
There are a couple of ways you could employ to update a custom process attribute in AgilePoint. If you have the premier license, it's available as a stencil under Premier Extension. This is pretty handy when you have simple, straightforward values.
However, when you need to manipulate data or perform complex data calculations prior to the update, you can make use of the Managed C# code stencil instead. It can be found under Advanced Extensions.
With just a simple line, you're on your way:
api.SetCustomAttr(pi.WorkObjectID, "YourAttributeName", "TheValue");
Retrieving?
string x = (string)api.GetCustomAttr(pi.WorkObjectID, "YourAttributeName");
However, when you need to manipulate data or perform complex data calculations prior to the update, you can make use of the Managed C# code stencil instead. It can be found under Advanced Extensions.
With just a simple line, you're on your way:
api.SetCustomAttr(pi.WorkObjectID, "YourAttributeName", "TheValue");
Retrieving?
string x = (string)api.GetCustomAttr(pi.WorkObjectID, "YourAttributeName");
Labels:
.NET,
AgilePoint
Sunday, February 23, 2014
Must-try foods in Taiwan (well, mostly Taipei)
Some of the most popular food in Taiwan. Most of the information is taken from the CNN article - Best Taiwanese food. The good folks at CNN Travel should have prepared one in Excel format for me to download in the first place...
I wanted something in Excel format that I could print out and refer to. Hope it will be useful to you too!
I wanted something in Excel format that I could print out and refer to. Hope it will be useful to you too!
Subscribe to:
Posts (Atom)