cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

How to clear URL Param()?

Hello,

Question:

- How do I remove a Param from the URL from within the application?

The Param() docs are scant and haven't been updated in 5 years (!). Need community help on this one!

Scenario:

- OnVisible of App:

 

 

If(
    !IsBlank(Param("testNumber")),
    Set(varTestNumber, Param("testNumber"));
    Navigate(scrSearch)
)

 

 

- OnVisible of scrSearch:

 

 

If(
    IsBlank(Param("testNumber")),
        Set(varTestNumber, Blank()),
    Set(varTestNumber, Param("testNumber"));
    Select(icnSearch)
)

 

 

 - This executes a search and the URL works very well as a "tap-out" from a legacy system. 

Problem:

- If user clicks the "Back" or "Cancel" button and wishes to perform a manual search, `Param("testNumber")` remains in the URL

- This causes a loop where the user cannot perform a new search due to `varTestNumber` being set automatically based on the URL

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Thanks for the reply @chsanche . I found a work around. Its a not the most eloquent, but works: 

Solution:

- OnSelect of "Cancel" or "Back" button (after user has come into the app via Parameterized URL):

If(
    IsBlank(
        Param("testNumber")
    ),
        Navigate(scrStart, Fade),
        Launch("https://apps.powerapps.com/play/<yourAppIdHere>?tenantId=<yourTenantIdHere>&hidenavbar=true")
)

- Translates to:

  - IF the user came into this screen using the traditional workflow, just navigate them back to the start screen 

  - ELSE relaunch the app without the Param() in the URL

Hope this helps others!

View solution in original post

2 REPLIES 2
Highlighted
Microsoft
Microsoft

Hi @ericonline 

 

I don't think this is going to be possible. PowerApps has limited functionality to modify the browser's resources, for example, PowerApps is able to launch a new tab but is not able to close a tab, I tried to search for this information in our documentation but got into the same URL you are indicating.

Unfortunately, I don't think we have this feature available for now.

 

Best Regards,

--

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions help users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

If this post helps you give a :thumbs_up: and if it solved your issue consider Accept it as the solution
Highlighted

Thanks for the reply @chsanche . I found a work around. Its a not the most eloquent, but works: 

Solution:

- OnSelect of "Cancel" or "Back" button (after user has come into the app via Parameterized URL):

If(
    IsBlank(
        Param("testNumber")
    ),
        Navigate(scrStart, Fade),
        Launch("https://apps.powerapps.com/play/<yourAppIdHere>?tenantId=<yourTenantIdHere>&hidenavbar=true")
)

- Translates to:

  - IF the user came into this screen using the traditional workflow, just navigate them back to the start screen 

  - ELSE relaunch the app without the Param() in the URL

Hope this helps others!

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,789)