Using the IfCOnd helper as defined in this post (HandleBars .Net If Comparision) I'm experiencing an issue with the helper not detecting the first argument being passed which is the particular field/attribute i want to compare the value of. My original question on the thread was deleted so i'm having to create it here as a separate question.
This is probably really simple but i've been going round in circles trying to get this working. So i'm hoping someone can help. I've implemented the condIf Helper that Hung Quach has detailed, however i can't get it to work where i want the value of a particular field in my data structure to be checked against a specified value
my handlebar syntax
{{#each ADFDatasets}}
{{#ifCond DataSetType, '==','TBL'}}
{
"name": "{{DatsetName}}",
"properties": {
"linkedServiceName": {
"referenceName": "{{LinkedServiceName}}",
"type": "LinkedServiceReference"
},
"folder": {
"name": "{{DisplayFolder}}"
},
"annotations": [],
"type": "Json",
"typeProperties": {
"location": {
"type": "AzureBlobFSLocation",
"fileName": "{{FilePattern}}",
"folderPath": "{{FolderPath}}",
"fileSystem": "{{FileSystem}}"
}
}
}
}
{{/ifCond}}
{{/each}}
the issues is with the line
{{#ifCond DataSetType, '==','TBL'}}
the data structure i'm passing it has an attribute called DataSetType (this is a string) i want to check if its value is a particular value and if so do some following logic. It just won't accept the DataSetType as the first argument an reports it as undefined.
Data Structure being passed to template
Is it simply my syntax is wrong or is this not possible? Cheers