How to use if condition in ADO YAML - azure-pipelines-yaml

'if' conditions in my ADO YAML file is not working. I am seeing syntax error.
I even copied the code from the section "Parameters to select a template at runtime" from https://learn.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#parameters-to-select-a-template-at-runtime but still seeing error. Please see the screen shot from my ADO
Tried to Microsoft sample code

Related

Dot inside VBA string of an Access application gets interpreted as a number sign upon execution

I'm working on a small Access database application that, among other things, exports a csv file when requested by the user.
The csv file should be created by the following code:
DoCmd.TransferText acExportDelim, "CSVexport", "tblExport", sLoc & Format(Date, "ddMMyyyy") & "_" & category & "_Export.csv", True
After fixing an issue with the data source part of the export (changed it from a query to a table), the _Export.csv part suddenly gets interpreted by Access as _Export#csv.
The error I'm getting:
Run-Time error '3011': The Microsoft Access database engine could not find the object '03022020_AluKippers_Export#csv'. Make sure the object exists and that you spell its name and path correctly . If '03022020_AluKippers_Export#csv' is not a local object, check your network connection or contact the server administrator.
I have no idea what's causing this.
Update: When changing the file extension to .txt, I get the same error. When using anything else after the dot, I get the cannot update error. I suspect the error may have something to do with the saved specification CSVexport...
Found the problem. The export specification I created, used the dot as the decimal symbol. After changing the decimal symbol back to , and the field delimiter from , to ;, the code in my question worked as expected.

Access VBA Convert Linked Table to Local

I am running into a problem and can use some advice. I am linking to an excel spreadsheet and then i am trying to convert that link into a table.
my very basic function is as follows
dim mypath as string
docmd.transferspreadsheet aclink, acspreadsheettypeexcel112xml, "importeddata", mypath, true
runcommand acCmdConvertLinkedTableToLocal
this gives me a runtime error 2046
The command or action 'ComvertLinkedTableToLocal' isn't available now.
So, the reason for doing the link and then the conversion is when done manually, it will get rid of all the conversion errors that a normal import will do and then I have my basic VBA scripts which seem to run far quicker in Access than Excel.
Again, any help is duly duly appreciated
Groundhog.
I believe you need to have a specific linked table selected in order to run the acCmdConvertLinkedTableToLocal command. Try something like this after linking:
DoCmd.SelectObject acTable, "importeddata", True
DoCmd.RunCommand acCmdConvertLinkedTableToLocal
Alternatively, have you tried creating an empty table that matches the spreadsheet structure (i.e. using text fields instead of numeric fields) so that you don't get the import errors when you import instead of link?
Thank you for sharing this code example. I had to make one addition to get this to work correctly for me. I was getting a runtime message that the command was not available before adding a DoEvents after the SelectObject and prior to acCmdConvertLinkedTableToLocal.

Identifying Excel filepath in SSIS

I'm using this ForEach loop tutorial in an attempt to import all my Excel files from a folder to an SQL table via SSIS. I followed the steps exactly but can't get the Excel source block to recognize the variable filename. The error I get shows that the filepath did not work at all:
Could not retrieve the table information for the connection manager ConnectionManagerName
The source file formatting, type, and folder are consistent. Has anyone else had this problem? I suspect I'm missing something between steps 2-4 in the link, but I wouldn't know what it is.
I've solved it! I used a ConnectionString in Step 3b instead of ExcelFileName. For anyone reading this answer, the exact ConnectionString format will vary (see here) but will be something like
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;
Extended Properties="Excel 12.0 Xml;HDR=YES";

VBA Range function suddenly accepts only localized arguments (pt-BR)

I'm using the brazilian-portuguese version of Excel on a Windows 7 also pt-BR.
I have a spreadsheet that I use for months in the same machine, same excel version, same etc. and a vba code that worked until today. As far as I know I have changed nothing.
The code was: Range("tabReport[[#All],[Valor]]")
Today when i ran the macro it gave me an error: Run-time error '1004': Method 'Range' of object '_Global' failed
After several trial and error I corrected to: Range("tabReport[[#Tudo];[Valor]]")
Notes:
1) "Tudo" is "All" translated to pt-BR.
2) Comma "," became semicolon ";", the equivalent in pt-BR local syntax.
What bugs me is this change from nowhere, that could affect other workbooks.
Also I prefer mantain my macro in USA English (Global) syntax mode, so it's easier to google and mantain.
Anyone have a clue about how can I control this behavior?

unterminated string constant QTP VB Script

I have a VB Script to connect SQL and retrieve value using ADODB recordset. Question: Upon using a multi- line SQL query with JOINs, i received error message : unterminated string constant.Kindly Advise.
If your VBScript lacks a closing punctuation mark at the end of a line. Which means it a syntax error in your script.
Check the syntax of your script, particularly for closing statements