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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,210)