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/name, '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/name,',''','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/name,',''','xyz',''',')))/aggregate($count as values)')
CodePudding user response:
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/name,','''','xez','''',')',')',')','/aggregate($count',' ','as',' ','PROD)')}
CodePudding user response:
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/name, ''xyz'')))/aggregate($count as values)')
Results: