Hello,


I am building a traditional webb app and i cant vind the previous screen in the link where the destination is set. First i had only two roles for this application depending on which role it would be it would be navigating to the previous screen.

However the customer required a third role where both(previous roles) are combined. This would have strange navigation behaviour through the application because some screens are accessed from different previous screens.

Do you know any way to set up a previous screen action ? I tried downloading a component from the forge however this wasnt compatible with the environment i am working on.

Also i do not have any javascript experience so if you have a solution with that please explain it to me step for step

Thank you in advance!

Hi Jari,

One way to do this is to add a PreviousURL as an input parameter for your screen and fill it with GetBookmarkableURL() when calling your screen. So, to go back to the previous screen you will navigate to this PreviousURL variable.


Best regards

Fabio


Hi Jari,

Another way to do with javascript could be like this.

1. Define a small javacript code inside a new WebBlock like this:

function goBack() {
  window.history.back();
}


2. Create a new server action that just calls that goBack function: (Remember to add the RunJavaScript action reference from HTTPRequestHandler producer)


3. Then you can put the new WebBlock into the screens you want to use, and in the screen action of the 'back' button, you can call the new JS_GoBack action.

Hello Fabio,


I have tried this in a way that i use the destination to common/externalURL but then im not able to send the other inputparameters to the screens!

Do you have an idea how to solve this ?

This is also the same fix i need when triggering the JS action.

Jari Dekker wrote:

Hello Fabio,


I have tried this in a way that i use the destination to common/externalURL but then im not able to send the other inputparameters to the screens!

Do you have an idea how to solve this ?

What exactly do you want to say here?


I have used External URL with parameters like below,


"Test.aspx?ABC=Hi"


There are two options in the way i would navigate, where i would like to use the same button.


Option 1

I am on a screen that needs 2 input parameters to make the aggregates work properly. When i click on go back i want to go to a screen that needs no input parameters. Where the solutions above work!

Option 2

I am on a screen that needs 2 input parameters and when i click on go back i need to go to another screen that also needs multiple input parameters. But with the solutions above i wont be able to send in the correct parameters because the page that is going to be navigated to isnt determined yet. 

Hi Jari,

I'd like to add another, entirely low code option, that I feel will suit your needs, because the number of possible screens you would want to flow back to is limited.

See attached oml. So it builds on the reply of Fabio, but with a much tighter coupling between the originating screens and the target screen.

Basically, when going to the target screen, you supply information about what screen it came from, and then in the save or back action, you use this to know what Destination Node to choose from.  The returning of information in the parameters of each destination node can stay the way you would do if you had only one screen to go back to.

I used a Static Entity to enumerate the possible screens you could have come from, because I think that makes for more readable code in both the flow to and flow back, but you could use other ways, it is not instrumental.

Hope this helps,

Dorine