error on formatdatetime on power automate - string

i just follow this instructions how to create weekly birthday reminder using power automate : https://powerusers.microsoft.com/t5/Building-Flows/Weekly-Birthday-Notification-for-newbie/m-p/1723027?lightbox-message-images-1723027=503163i3A49E010C4BF961F#M190930
the problem is i got error on filter arrays that said : The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.
please advice
i already tried adding string type on the syntax

Related

How to use timestamp type parameters set in pipeline with timestamp type in data flow

I can't send the question due to some mysterious error, so I'll share a screenshot of the question.
Can anyone help me solve this?
I have reproduced the above and got same error when the Expression checkbox in checked.
Remove the Expression checkbox check in dataflow pipeline assignment and pass it as a string. Now it won't give the error.
It will take the Dataflow parameter like this.
Also, along with the Date time string pass the format in toTimestamp() function to avoid null values.
This is my sample input data:
sample filter condition:
toTimestamp(start_date,'yyyy-MM-dd\'T\'HH:mm:ss')
Filtered Result:

Excel VBA objsnmp.set strange things

I use the objSNMP.get method in Excel VBA without any problems.
I'd like to use the objSNMP.set method, but unfortunately it's not that easy. According to the website, it should work similarly to get, with the difference that there is one more parameter: the value to be sent.
If I try the official way:
objSNMP.Set ("43.18.1.1.2", OIDValue)
Image1
I get the message "Compile error: Syntax error".
I found another solution that works conditionally. Namely as follows (it can be seen commented out in the picture):
randomVarName = objSNMP.Set("OID", Value)
For example:
temp = objSNMP.Set(".1.3.6.1.4.1.9.9.68.1.2.2.1.2." & PortNum, 21)
In this case, the code runs without error. This is interesting because I haven't found any official information about this anywhere. Somewhere deep in the recesses of the internet, I only found this possible solution some time ago.
If, on the other hand, I do not enter the value directly, but write the name of a variable there (e.g. VLANNum),
temp = objSNMP.Set(".1.3.6.1.4.1.9.9.68.1.2.2.1.2." & PortNum, VLANNum)
I receive an error message. Image2
It doesn't matter if the type of the variable is not declared, string or integer. I also tried several different cell types in Excel, but nothing changed.
The error message is:
Run-time error '-2147467259 (80004005)':
The requested SNMP operation attempted to modify a variable, but
either a syntax or value error occurred.
Based on the above, I cannot insert the value read from the excel table at the end of the "objSNMP.Set" method in such a way that it can send the value. I could only solve the task if I create 4094 different "objSNMP.Set" lines and select what is necessary from among them. Not very efficient.
I have the solution. The value transferred with the variable works in the following form:
objSNMP.Set ".1.3.6.1.2.1.2.2.1.7.9", CInt(x)
Where x is the variable.

proper syntax for bpel bpel:doXslTransform

I am trying to do an XSL transform on an xml structure in a bpel assignment statement. There is a syntax problem, but I am having trouble finding official documentation. There are examples all over the internet but I have not found a clear explanation. Here is my best shot. What do the last two parameters do? Why is eclipse saying the first argument must be a literal, even though test3.xsl is a string?
<bpel:assign validate="yes" name="Assign">
<bpel:copy keepSrcElementName="no">
<bpel:from>
<![CDATA[bpel:doXslTransform("test3.xsl", $personalInfoServiceOutput.parameters), "middle", $positionSkillManagementInput]]>
</bpel:from>
<bpel:to variable="positionSkillManagementInput"></bpel:to>
</bpel:copy>
</bpel:assign>
The signature of doXSLTransform looks as follows:
object bpel:doXslTransform(string, node-set, (string, object)*)
The first parameter is the name of the XSLT script, the second parameter is an XPath identifying the source document (e.g. a variable, part, nodeset, node). The third and the fourth parameter is a key-value pair, the string is the key and the object is the value. Those pairs are mapped into the script's parameter context so that you can access these values by their name in the script. There can be any number of these pairs.
The best resource to look up such things is the WS-BPEL 2.0 specification, doXSLTransform is described in Sect. 8.4
When I use the following code :
<bpel:copy keepSrcElementName="no">
<bpel:from>
<![CDATA[bpel:doXslTransform("parseSample.xsl", $output.payload)]]>
</bpel:from>
<bpel:to variable="output"></bpel:to>
</bpel:copy>
I also get the error, that first argument must be literal string.
But, when I deploy my service (with error) to wso2 bps, it works fine.
You can try with this.
I faced the same issue. Agree with NGoyal. Shows error in BPEL but works when deployed.

String to XNamespace Implicit Conversion inside a BizTalk Orchestration

I am a bit confused by what I see and hence headed over to SO.
I am developing a BizTalk (2010) Orchestration and I am wanting to parse an incoming XML message. I just need to retrieve then number of times a particular node is repeating. I could have used XPath. But, I chose to use LinqToXml.
I have created a variable of type System.Xml.Linq.XNamespace and inside an expression shape, I am assignning it a string value.. say http://mycompany/v1.0. This is a perfectly valid C# statment, as there is an implicit conversion from String to XNamespace (MSDN link).
But the Orchestration will not compile at all. I get this error cannot implicitly convert type System.String to System.Xml.Linq.XNamespace.
And if I dont use the XNamespace variable and directly run LinqToXml on the incoming message like this
MessageCount = MyXElement.Elements("{http://mycompany/v1.0}ListOfNotifications").Elements("{http://mycompany/v1.0}Notification").Count();
I get a cannot convert from String to XName error. Even this is confusing.
I am using BizTalk 2010 and C# 4.0. Can someone explain if I am missing something? I have tried all these code snippets using LinqPad and I get the expected response. So, there are no typos or missing references.
I opted to use the XPath option to retrieve the values that I needed, instead of using LinqToXml. The code that I ended up writing looks like below:
xpath(myOrchVariable, "string(/*[local-name()='InputRootNode' and namespace-uri()='http://my/name/space'])")

How can I convert a string array to a variant array in VBscript?

I'm using a function in vbscript which returns a variant array of strings.
JobIDs = objDoc.ConnectedSubmit(objServer)
The problem is I can't get the Job ID values from that array, as vbscript doesn't handle typed variables. It just gives a type mismatch when I attempt to do ANYTHING with the JobIDs array. I found some promising information here, but when I used the conversion function:
Set objConverter = CreateObject("ADS.ArrayConvert")
ConvertedJobIDs = objConverter.CStrArray(JobIDs())
It is giving me the same type mismatch error. Am I missing something obvious here? This is, apparently, an official microsoft solution, so I'm not sure why it seems to have the same problem, namely, not being able to actually do anything with a string array in the first place. I've seen the first part of my question answered in many places, all pointing to the MS solution, but I have yet to see any follow up reports of someone successfully using that solution.
I'm not sure if I understand why it doesn't work, so this answer might not be very helpful. I would have thought that something like this might work (following on from your previous question I'm assuming you're trying to get the cancellation to work):
For Each id In JobIDs
WScript.Echo id
YourJob = YourOutgoingFaxQueue.GetJob(id)
YourJob.Cancel()
Next
This behavior is by design, VBScript can't do anything with a non-variant array, there was a KB article from Microsoft that explained this but it is not on-line anymore:
Q165967 - PRB: Script Error Occurs When Referencing Non-variant Array
An archived copy of the article can be found at:
https://ftp.zx.net.nz/pub/archive/ftp.microsoft.com/MISC/KB/en-us/165/967.HTM

Resources