Monday, March 25, 2013

Infopath set year in form

To set a value for a field upon loading, use textbox properties and Default value instead of rules.
To get the current year, use formula : substring(today();0;5)
image

Friday, March 22, 2013

Infopath and lookup columns in workflows

When creating items using workflows its important that the values are exactly matchable. For instance, if the value in the list is a lookup value from another list, like employes, its important that the value that gets sent is the actual ID of the employee.

Its gets more complex when using infopath to edit a workflow forms. Here we got another layer that needs to be exactly matched. In this instance we needed to use another lookupfield in the actual infopathform and pass that form variable to the workflow.

When getting values to a dropdown-list from a external datasource, like a sharepointlist, the default behaviour is that value is the same as display name. When this value needs to match to another lookupfield the value-field needs to be changed to ID. Otherwise the workflow will just die.

image

Can’t edit or create maintainance jobs in SQL Management Studio

Error: Agent XPs component turned off off as part of the security configuration….

image

 

Executed following:

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
GO
RECONFIGURE
GO

Threw an some error but after this it was possible to edit again.

References:

http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/e8924b76-0a8b-46a4-b7e5-db6bc5b4f883/

Outlook keeps crashing

Outlook crash upon startup.

Running in safe mode gives same result, running offline aswell. Event Log shows Application Error with Faulting module name KERNELBASE.dll

image

Solution: Repair the local OST-file

C:\Program Files (x86)\Microsoft Office\Office14\scanpst.exe

References:

http://support.microsoft.com/kb/2291280

Thursday, March 21, 2013

Error when trying to open Infopath 2010 from SPD 2013

I need SPD 2013 to work with Sharepoint 2013 effeciently. though I have an emailserver that’s using Exchange 2003 so I can’’t install Office 2013. Which means my infopath is version 2010. This issue arises when I from Sharepoint Designer tries to edit a form with Infopath.

Error given is: To open this file, you must first install Microsoft InfoPath 2013 on this computer.

To resolve, without upgrading Office, install Microsoft KB2804405

References:

http://support.microsoft.com/kb/2804405

Check Office licens

From \Microsoft Office\Office14\ folder run

cscript ospp.vbs /dstatus to check.

might come in handy if need to find out where the user got his key from.

image

References:

http://www.mydigitallife.info/how-to-check-office-2010-activation-status-and-license-type-channel/

Displaying different Infopathforms in list

For some situations we might want to show a list, like when we’re creating an Item. While other situations we need to see a more clean view, like for printing and such.

Enter Infopath views! under Page Design > View , we can create a totally different form, but based on the same listitem. image

There’s already an Printview inplace but we can create a new one for viewing.

Now, we’ve create a new view and we want this to be the default one when clicking View Item in a list.

  1. Under List>Customize List>Form Web Parts v>[ContentType Forms] (Item) Display Formimage
  2. Edit Infopath form Web part, change Views to your preferred view, like Printview

 

 

Its also possible to create a button in a form and switch views by clicking farily easy.

  1. Create button
  2. Control Tool>Properties>Add Rule>When this button is clicked>Switch Views

image

Preferences:

https://www.nothingbutsharepoint.com/sites/eusp/Pages/How-to-Design-Different-Display-for-View-Edit-List-Item.aspx

http://office.microsoft.com/en-us/infopath-help/add-delete-and-switch-views-pages-in-a-form-HA101732801.aspx

http://blogs.msdn.com/b/prasad_madhavan/archive/2011/05/04/customizing-sharepoint-list-new-edit-display-forms-individually-in-infopath-2010.aspx

http://sharepoint.stackexchange.com/questions/43788/using-default-list-forms-for-edit-view

Tuesday, March 19, 2013

Infopath calculate time difference between two inputs

Need to get the number of hours between two timeinputs in infopath. This will always be on the same day.
60 * (substring(laterTime, 12, 2) - substring(earlierTime, 12, 2)) + (substring(laterTime, 15, 2) - substring(earlierTime, 15, 2)) + (substring(laterTime, 18, 2) - substring(earlierTime, 18, 2)) div 60
When pasting this to a field in infopath, we first need to remap latertime and earliertime to relevant fields in our own form. When trying to verify the formula it throws an error stating a missing ,
Upon closer examination of the xpath values we notice than an extra . is in place where the , should be .
image
When the dots are are replaced with commas the code works as it should.
References:
http://www.infopathdev.com/forums/p/20732/71795.aspx

Friday, March 08, 2013

Lockscreen shortcut

When bouncing about on different desktops, virtual and otherwise physical its easy to leave a computer unlocked sometimes. This isn’t so good, but shortcuts tends to flip out when accessing remote systems. A good security practice is to create a desktop shortcut that can lock the computer very easily.

So,

1. Create a shortcut

2. Enter: rundll32.exe user32.dll,LockWorkStation

3. Save and change icon to a padlock or something more logical. This among other icons can be found in Shell32.dll under system32

References:

http://www.sevenforums.com/tutorials/13278-lock-computer-create-shortcut.html

http://ask-leo.com/how_do_i_change_the_icon_of_a_desktop_shortcut.html

Powershell and Uptimerobot

Uptimerobot can be quite tedious when you need to update many monitors at once. For example say you bought the license for Uptimerobot and n...