33
Views
10
Comments
Solved
Helpfile parameter appended to URL in link
Question

I am getting a '?Helpfile=' link appended to my External URL when I don't want that parameter causing it to fail going to my link.  I am leaving the Helpfile parameter blank.  How do I make it go away?

mvp_badge
MVP
Rank: #69
Solution

Go to your ExternalURL definition (in Common). It will have a HelpFile parameter that you can delete.

If it is in use, you can create a copy of it without the parameter.

That's it.



mvp_badge
MVP
Rank: #69

Hi James.

An External URL? The easy way is to place it inside an if.

Your expression will be  

BaseURL+If(Helpfile="","","?HelpFile="+HelpFile)

If HelpFile has a value, it will be sent. If it hasn't, you don't send it.

Rank: #23181

I appreciate your answer.  I would still like to ask why it is appending it when the parameter is left blank? Thanks.


Rank: #23181

I tried this solution and the expression doesn't recognize Helpfile.  It says it's unknown which makes sense since it's a property of the destination object.

SyntaxEditor Code Snippet

"http://sqlreports01/Reports/report/Information%20Technology/Software%20Ops%20and%20Maint/PHIAdminReview" + 
    If(Helpfile = "","","Helpfile=" + Helpfile)
mvp_badge
MVP
Rank: #76

Hi James,

You forgot to put the questionmark (?) in your IF statement before "HelpFile=" and also make sure your HelpFile local variable is of Text data type and exists within the Scope of the screen.

"http://sqlreports01/Reports/report/Information%20Technology/Software%20Ops%20and%20Maint/PHIAdminReview" + If(Helpfile = "","","?Helpfile=" + Helpfile)

Hope this helps.

Regards,

Nordin

mvp_badge
MVP
Rank: #69

I think we are complicating what is easy.

1.Only if the target page is a OS screen with parameters it would use an empty variable in the URL. And OS can handle non-mandatory parameters blank so that is a non-issue.

2. If you don't have a Helpfile value to send, you don't need to send anything. Just use 

"http://sqlreports01/Reports/report/Information%20Technology/Software%20Ops%20and%20Maint/PHIAdminReview"


Rank: #23181

What I'm trying to tell you is that OUTSYSTEMS is appending the Helpfile parameter, not me.  It breaks my call no matter what I put in it or not put in it.  In my opinion, the code behind the parameter Helpfile is adding the parameter to my URL and I don't want it.

So, to get around this, are you telling me I need to instantiate a local variable Helpfile and then use 

If(Helpfile = "","","?Helpfile=" + Helpfile) 

to get around this problem?  I would rather that if I leave a parameter blank it didn't do anything but use the URL parameter I supplied.

This is new to Version 11.  This parameter didn't exist in 10.  I've been using external URLs for several years and this is the first time I've had issues with one. The following is added by Outsystems, not me.

mvp_badge
MVP
Rank: #69

No. don't create nothing.

I thought you had the value in HelpFile and didn't want to send it when it was empty.


If you use RedirectToURL, parameters are  not mandatory.

Can you show what you are using?


Rank: #23181

This is how I've set it up.

Where do you find this?  I've looked everywhere (in version 11)

mvp_badge
MVP
Rank: #69
Solution

Go to your ExternalURL definition (in Common). It will have a HelpFile parameter that you can delete.

If it is in use, you can create a copy of it without the parameter.

That's it.



Rank: #23181

Awesome. That works. Thanks.