'how to add single quotes in data factory dynamics experssion
below is my API
https://abc/api/data/v9.1/accounts?$apply=filter((_ownerid_value ne null) and (owningteam/teamtype eq 0 and contains(owningteam%2fname, 'xyz')))/aggregate($count as values)
and i'm trying add paramters to it(linkedservice().entityname) ,so in dynamic content i have made the following changes , but it is giving error at 'xyz'.
@concat('https://abc.api.crm.dynamics.com/api/data/v9.0/',linkedService().entityname,'?$apply=filter((_ownerid_value ne null) and (owningteam/teamtype eq 0 and contains(owningteam%2fname,',''','xyz',''',')))/aggregate($count as values)')
@concat('https://abc.api.crm.dynamics.com/api/data/v9.0/',linkedService().entityname,'?$apply=filter((_ownerid_value ne null) and (owningteam/teamtype eq 0 and contains(owningteam%2fname,',''','xyz',''',')))/aggregate($count as values)')
Solution 1:[1]
this way it worked for me
@{concat('data/v9.0/',linkedService().Entityname,'?$apply=filter((_ownerid_value',' ','ne',' ','null)',' ','and',' ','(owningteam/teamtype',' ','eq',' ','0',' ','and',' ','contains(owningteam%2fname,','''','xez','''',')',')',')','/aggregate($count',' ','as',' ','PROD)')}
Solution 2:[2]
Use two single quotes ''
in the expression to get the string value with a single quote '
in the result.
@concat('https://abc/api/data/v9.1/',pipeline().parameters.entityname,'?$apply=filter((_ownerid_value ne null) and (owningteam/teamtype eq 0 and contains(owningteam%2fname, ''xyz'')))/aggregate($count as values)')
Results:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Josh |
Solution 2 | NiharikaMoola-MT |