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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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