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 III
Super User III

@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 III
Super User III

@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 III
Super User III

@ElectricLlama2 

The syntax beneath with the single quotes should be valid:

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

 

View solution in original post

ElectricLlama2
Frequent Visitor

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (65,337)