Forum Discussion
dvdbroek
5 years agoFrequent Visitor
Using the given variable parameters and putting them in a JSON format body in M
Dear PowerBI wizzards, Im pretty new to M and its coding. Currently im working to make a presentation with its input comes from an API. The API itselfs needs to be provided with a ClientIdentifie...
- 5 years ago
I came up with this and it works:
body = "{""clientIdentifier"":""xxxxxxxx"", ""clientSecret"":""xxxxxxxx"", ""username"":" & Text.FromBinary(Json.FromValue(UserName)) & "," & " ""password"":" & Text.FromBinary(Json.FromValue(Password)) & "," & " ""officeCode"":" & Text.FromBinary(Json.FromValue(OfficeCode)) & "}",If there are smarter or better solutions i gladly hear them:)
dvdbroek
5 years agoFrequent Visitor
I came up with this and it works:
body = "{""clientIdentifier"":""xxxxxxxx"",
""clientSecret"":""xxxxxxxx"",
""username"":" & Text.FromBinary(Json.FromValue(UserName)) & "," & "
""password"":" & Text.FromBinary(Json.FromValue(Password)) & "," & "
""officeCode"":" & Text.FromBinary(Json.FromValue(OfficeCode)) & "}",
If there are smarter or better solutions i gladly hear them:)