Sunday, January 5, 2014

PowerShell: passing parameters by reference, and assigning values

example:
function ParamTest($ArgA, [ref] $ArgB)
{
    $ArgA = "Hello A!"
    // The following line won't work; it is referencing System.Management.Automation.PSReference
    $ArgB = "Hello B!" 
    // This line is the correct way to assign
   $ArgB.value = "Hello Test!"
    return $ArgA
}
$a = "A.."
$b = "B.."
write-host "a is $a"
write-host "b is $b"
$output = ParamTest -ArgA $a -ArgB ([ref] $b)
write-host "a is now $a"
write-host "b is now $b"


AgilePoint InfoPath 2010 integration: Submit & Close button not showing on web browser forms

Situation: I had a web-browser enabled InfoPath 2010 form hosted in SharePoint that I wanted to apply AgilePoint workflows to. To my endless frustration, the "Submit and Close" button normally associated with InfoPath approvals simply would not appear, no matter how I tried.

According to AgilePoint documentation, I am supposed to perform several steps such as removing code from InfoPath (Form Options - Programming), closing the InfoPath form, opening AgilePoint envision, creating a dummy InfoPath template and that would fix the issue. Obviously this is not working for InfoPath 2010 web-browser enabled forms!

Related Posts Plugin for WordPress, Blogger...