{"action":"created","issue":{"url":"https://api.github.com/repos/ahaydon/Qlik-Cli/issues/38","repository_url":"https://api.github.com/repos/ahaydon/Qlik-Cli","labels_url":"https://api.github.com/repos/ahaydon/Qlik-Cli/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/ahaydon/Qlik-Cli/issues/38/comments","events_url":"https://api.github.com/repos/ahaydon/Qlik-Cli/issues/38/events","html_url":"https://github.com/ahaydon/Qlik-Cli/issues/38","id":293961863,"number":38,"title":"Using & in variables in filters","user":{"login":"alexometis","id":19587679,"avatar_url":"https://avatars0.githubusercontent.com/u/19587679?v=4","gravatar_id":"","url":"https://api.github.com/users/alexometis","html_url":"https://github.com/alexometis","followers_url":"https://api.github.com/users/alexometis/followers","following_url":"https://api.github.com/users/alexometis/following{/other_user}","gists_url":"https://api.github.com/users/alexometis/gists{/gist_id}","starred_url":"https://api.github.com/users/alexometis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexometis/subscriptions","organizations_url":"https://api.github.com/users/alexometis/orgs","repos_url":"https://api.github.com/users/alexometis/repos","events_url":"https://api.github.com/users/alexometis/events{/privacy}","received_events_url":"https://api.github.com/users/alexometis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-02T17:18:48Z","updated_at":"2018-03-19T15:33:56Z","closed_at":null,"author_association":"NONE","body":"Here's what I was trying to do:\r\n```\r\n$apps = 'This Extract','This & That Extract'\r\n\r\nforeach ($app in $apps)\r\n{\t\r\n\techo \"Processing: $app\"\r\n\tget-qlikapp -filter \"stream.name eq 'Extract' and name eq '$app'\" | copy-qlikapp -name \"$app COPY\"\r\n}\r\n```\r\nThe first app works fine, but any app with & in the name fails. \r\nIf I run just:\r\n```\r\nget-qlikapp -filter \"stream.name eq 'Extract' and name eq 'This & That Extract'\" | copy-qlikapp -name \"This & That Extract COPY\"\r\n```\r\nit works fine, so it appears to be to do with how it's interpreting the string. \r\n\r\nI've tried escaping the & - `\\&` or `` `& `` - in the variable and using `\"` or `` ` `` around various things to no avail.\r\n\r\nThis may be my inexperience with PowerShell rather than an issue, but I couldn't find a workaround other than hard-coding the values. Interestingly Streams with & in them don't seem to cause the same issue. "},"comment":{"url":"https://api.github.com/repos/ahaydon/Qlik-Cli/issues/comments/374255260","html_url":"https://github.com/ahaydon/Qlik-Cli/issues/38#issuecomment-374255260","issue_url":"https://api.github.com/repos/ahaydon/Qlik-Cli/issues/38","id":374255260,"user":{"login":"alexometis","id":19587679,"avatar_url":"https://avatars0.githubusercontent.com/u/19587679?v=4","gravatar_id":"","url":"https://api.github.com/users/alexometis","html_url":"https://github.com/alexometis","followers_url":"https://api.github.com/users/alexometis/followers","following_url":"https://api.github.com/users/alexometis/following{/other_user}","gists_url":"https://api.github.com/users/alexometis/gists{/gist_id}","starred_url":"https://api.github.com/users/alexometis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexometis/subscriptions","organizations_url":"https://api.github.com/users/alexometis/orgs","repos_url":"https://api.github.com/users/alexometis/repos","events_url":"https://api.github.com/users/alexometis/events{/privacy}","received_events_url":"https://api.github.com/users/alexometis/received_events","type":"User","site_admin":false},"created_at":"2018-03-19T15:33:56Z","updated_at":"2018-03-19T15:33:56Z","author_association":"NONE","body":"Thanks - I'd renamed my apps to avoid this, so can't easily test now, but thanks for resolving. "}}
{"actor":{"display_login":"alexometis"}}