{"action":"created","issue":{"url":"https://api.github.com/repos/nightroman/Mdbc/issues/11","repository_url":"https://api.github.com/repos/nightroman/Mdbc","labels_url":"https://api.github.com/repos/nightroman/Mdbc/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/nightroman/Mdbc/issues/11/comments","events_url":"https://api.github.com/repos/nightroman/Mdbc/issues/11/events","html_url":"https://github.com/nightroman/Mdbc/issues/11","id":243399756,"number":11,"title":"Weird issue connecting ","user":{"login":"sunitjoshi","id":11892223,"avatar_url":"https://avatars7.githubusercontent.com/u/11892223?v=4","gravatar_id":"","url":"https://api.github.com/users/sunitjoshi","html_url":"https://github.com/sunitjoshi","followers_url":"https://api.github.com/users/sunitjoshi/followers","following_url":"https://api.github.com/users/sunitjoshi/following{/other_user}","gists_url":"https://api.github.com/users/sunitjoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/sunitjoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunitjoshi/subscriptions","organizations_url":"https://api.github.com/users/sunitjoshi/orgs","repos_url":"https://api.github.com/users/sunitjoshi/repos","events_url":"https://api.github.com/users/sunitjoshi/events{/privacy}","received_events_url":"https://api.github.com/users/sunitjoshi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-17T13:43:04Z","updated_at":"2017-07-17T15:03:37Z","closed_at":null,"body":"I'm having a weird issue when trying to connect to db/collection.\r\n If I do this from PS prompt it works:\r\n`Connect-Mdbc . \"Xamain\" \"Students\"`\r\n\r\nThen call this function and it works:\r\n\r\n```\r\nfunction List-XamarinUniv\r\n{\r\n\t[CmdletBinding()]\r\n    param\r\n\t(\r\n\t\t[Parameter(Mandatory=$false)]\r\n\t\t[string]$mgrEmail=\".\"\r\n\t)\r\n\t#Connect-XamarinUniv\r\n\t$query = New-MdbcQuery MgrEmail -Matches $mgrEmail, 'i'\r\n\tGet-MdbcData -Query $query -AS PS -SortBy MgrEmail | Select MgrEmail, UserEmails, _Id\r\n}\r\n```\r\n\r\nIf I try  to connect via a function (below) & uncomment its call above, List-XamarinUniv fails:\r\n\r\nfunction Connect-XamarinUniv\r\n```\r\n{\r\n\t#Default collection is Xamarin\r\n\t$db=\"Xamarin\"\r\n\t$coll=\"Students\"\r\n\tConnect-Mdbc . $db $coll\r\n}\r\n#This fails\r\nList-XamarinUnivStudents\r\n```\r\n\r\nError:\r\n> Get-MdbcData : Specify a collection by the parameter or variable Collection.\r\n\r\nrgds\r\nSJ"},"comment":{"url":"https://api.github.com/repos/nightroman/Mdbc/issues/comments/315782363","html_url":"https://github.com/nightroman/Mdbc/issues/11#issuecomment-315782363","issue_url":"https://api.github.com/repos/nightroman/Mdbc/issues/11","id":315782363,"user":{"login":"sunitjoshi","id":11892223,"avatar_url":"https://avatars7.githubusercontent.com/u/11892223?v=4","gravatar_id":"","url":"https://api.github.com/users/sunitjoshi","html_url":"https://github.com/sunitjoshi","followers_url":"https://api.github.com/users/sunitjoshi/followers","following_url":"https://api.github.com/users/sunitjoshi/following{/other_user}","gists_url":"https://api.github.com/users/sunitjoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/sunitjoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunitjoshi/subscriptions","organizations_url":"https://api.github.com/users/sunitjoshi/orgs","repos_url":"https://api.github.com/users/sunitjoshi/repos","events_url":"https://api.github.com/users/sunitjoshi/events{/privacy}","received_events_url":"https://api.github.com/users/sunitjoshi/received_events","type":"User","site_admin":false},"created_at":"2017-07-17T15:03:36Z","updated_at":"2017-07-17T15:03:36Z","body":"I've updated it. \n\nRgds\nEA\n\n> On Jul 17, 2017, at 8:58 AM, Roman Kuzmin <notifications@github.com> wrote:\n> \n> What does \"#This fails\" mean? Could you please provide the error message?\n> \n> What is List-XamarinUniStudents? It is not defined in the code you provided.\n> \n> Could you please edit your message to improve code formatting? You triple backticks instead of singles in order to wrap multi-line code.\n> \n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n> \n"}}
{"actor":{"display_login":"sunitjoshi"}}