I have built a custom connector in visual studio to connect to a custom datasource. I am however struggle adding and IF statement in the function as I see that it indicates an error when I add one. Here is a simple code snipt of that I am trying to do.
Connect = (url as text, count as number) => let
If count< 1 then samplecount = 1 else samplecount= count, response = Json.Document( Web.Contents(url, [ samplecount])) in response;
I am not sure if it is a limitation of the PowerBI connector SDK or I am not following the examples online correctly. Please share same insight if possible.