cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ElectricLlama2
Frequent Visitor

Escaping colon when building a record

I'm calling a paginated SSRS report from my PowerApp like this:

 

Launch("https://app.powerbi.com/groups/{guid}/rdlreports/{guid}?rp:LocationId=" & Text(rSelectedStore.StoreId));

 

This works fine in the web but on an iPad it is opened in the PowerBI app and the parameter at the end is ignored and you have to select the store again.

 

This has been confirmed by MS as an issue. 

However I would like to try the Launch function using parameters, except of course this doesn't work:

 

Set(

  rParams,
  {
    rp:LocationId:Text(rSelectedStore.StoreId)
  } 

 

Launch("https://app.powerbi.com/groups/{guid}/rdlreports/{guid}",rParam);

 

Because there is a colon in the element name.

 

rp:LocationId

 

Does anyone know the correct syntax?

 

I've tried the obvious things like

 

 

  {
    "rp:LocationId":Text(rSelectedStore.StoreId)
  } 

 

  {
    rp\:LocationId:Text(rSelectedStore.StoreId)
  } 

 

Is there any other way to build a data structure?

Any assistance appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@ElectricLlama2 

The syntax beneath with the single quotes should be valid:

Set(
  rParams,
  {
    'rp:LocationId':Text(rSelectedStore.StoreId)
  } 
);

 

View solution in original post

4 REPLIES 4
timl
Super User
Super User

@ElectricLlama2 

The usual way to do this would be to URL encode the : symbol. The escape character for this is %3a.

Assuming that the following link works, you can call the EncodeUrl function to escape your URL.

 

Launch("https://app.powerbi.com/groups/{guid}/rdlreports/{guid}?rp%3aLocationId=" & Text(rSelectedStore.StoreId));

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-encode-decode

 

 

Thanks for your response. I'm already using the "concatenate it all in the query string" approach and it works. Now I want to use the parameter collection method. The real question is how do I create a JSON structure like this:


Set(

  rParams,
  {
    rp:LocationId:Text(rSelectedStore.StoreId)
  } 

);

 

 

The problem is that the JSON elements name is rp:LocationId and that is not valid (syntactically)

timl
Super User
Super User

@ElectricLlama2 

The syntax beneath with the single quotes should be valid:

Set(
  rParams,
  {
    'rp:LocationId':Text(rSelectedStore.StoreId)
  } 
);

 

ElectricLlama2
Frequent Visitor

Thanks for you response timl, that did that trick! I did try " and [ but not '

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,910)