Forms Redirect URL including Source parameter

  • 25 August 2016
  • 8 replies
  • 64 views

Badge +2

I have a form with a button that the user wants to change a field, save the item and reopen it for further editing.  I have used the Redirect URL parameter to accomplish that but also want the URL to include the Source parameter so that the interface goes back to the proper place when the item is closed.  This is the formula I have entered:

fn-If(fn-Equals(Status,"Submitted"),fn-Replace(Item URL,"DispForm","EditForm")&Source=fn-GetQueryString("Source"),fn-GetQueryString("Source"))

The problem I have is that the text appears to be encoded by Nintex because the '&' is changed to '&", which makes the URL not work.  I've tried everything I can think of but if the last thing it does is encode that string, I'm not sure I will be able to prevent the encoding.  When I tried using fn-XmlDecode("&") as part of the formula, the output string included '&' but truncated there.

Is there any way to do what I want?  I saw something in a post about using {TextStart} and {TextEnd} in workflow formulas.  Are there other similar parameters I can use to prevent the encoding of part of a string?

Thanks.


8 replies

Badge +10

Hi Don,

Just a suggestion, may be try fn-Replace(Item URL,"DispForm.aspx&","EditForm.aspx&")

Badge +2

Thanks for the suggestion but that doesn't work for two reasons.  First, after the aspx is "?ID=41", not the &Source.  Second, since the & is an "escape" character, it is not replaced like other text.  I appreciate the idea though.

Badge +10

do you really the source if not remove it.

or you can try an insert fn-Insert("1",1,"&")

it is still putting that amp; but the url is working

Badge +11

‌, how about adding some characters that are repeated that you absolutely know will not occur. For example, 'zz' or 'qq'.

Userlevel 5
Badge +14

have a look here for a similar problem  

haven't tested it but I would say something like %26amp%3B might work for '&' character

Userlevel 6
Badge +16

Hi Don McNally‌:

Have you solved it?

#waitinganswer

Badge

I had the same problem. I wanted a link to open correct Content Type with the correct item ID. I used this Encode-service:

http://www.url-encode-decode.com/

Took the URL, added the ID from "Item Properties" and it works great.

Badge +3

%26 instead of an & solved this issue for me.

Reply