29
Views
8
Comments
Solved
How to manipulate data on screens from different modules.

Hello !

Sorry, I'm a learner and I need help with an exercise: I built a Reactive Web application with several “Service_CS” modules and 2 “End User _UI” modules.

One “End User” module is a usual Customers Entity, created by Scarfold, with two screens: Customers List and Customer Details.

The other “End User” module has a screen with a “Service Order” form.

Each new Service Order begins with a “DropBox” where the attendant selects the customer and proceeds normally. If the customer does not yet exist, then a button with a link jumps to the “Customer Details” screen for the attendant to include this new customer without having go to  “Customer Registration” module, which the attendant's Role does not allow. 

I can jump from  “Service Order” screen to  “Customer Details” screen. 

But Customer Details´s Save Action must allow two returns: One when activated by the “Service Order”, to which must return after including the new customer, and another for the “Customers List” when activated by the “New Customer” button ”.

I can't implement both return possibilities. I tried with a Client Variable together with a Web Block but I failed to do something or did it wrong. This is the help I need.Thanks !

Solution

If I am not mistaken, then at first when you go from  “Service Order” screen to  “Customer Details” screen, you must be using Redirect URL and setting the URL for Customer Detail screen, so here in URL you need to append the input parameter and pass TRUE. Now when it goes to your customer detail screen your input value will be True and you can use in Save logic.

Solution

Dear Puja Rani,

This worked perfectly !!!!!!

Congratulations !!!

Thanks again for your attention.

Happy to know your issue is solved:)

Create a static which you can just save the screen where you are navigating and that way you can use that static ID as input in your customer details screen which you are going to pass the ID of the screen where you are coming from. That way you will be able to manage which type of return will occur.

Dont know if that is the best approach but I think it's something I would do.

Now, what is really your problem? knowing where you are coming from or passing the return?

You cannot pass lists by inputs in screens, what you might do is serialize the structure of data you want to pass and on the other screen you deserialize and there you have the data that you want.

https://itnext.io/serializing-deserializing-json-in-the-outsystems-platform-ae08f2f6b5b4

If this doesn't help you, elaborate a bit more please :)

Hello Marcio,

Thanks for the feedback and, sorry, maybe I wasn't clear.

My problem really is knowing where it comes from to return.

I go to “Customer Detail” now from “Service Order” using the “New Customer” button, now from “Customer List” using the “Add Customer” button and so far so good.

In one way or another, after entering the new customer's data in “Customer Detail”, what can the “Save” button action do to return where it came from?

“Service Order” and “Customer Detail” are in different modules.

Thanks.

Hello Marcio,Trying to be more specific...

SaveCustomer.png

Hi,

May be you can try this, CustomerDetail screen your can create a non-mandatory input parameter, say IsFromServiceOrder, set default to False, if coming from Service Order , pass value as TRUE. In your save action you can add condition if value is True, then redirect to ServiceOrder or else to customer screen.

Hi Puja Rani, Thank you for your attention.

I implemented "IsFromServiceOrder" as instructed, on the Customer Detail screen, which is in the "Customer" module as well as the "SaveCustomer" action.

Service Order is inside another module: "Order". In this module, "IsFromServiceOrder" is out of scope and I don't know how to pass the "True".

I called dependencies (nothing changed).

Thanks.

Solution

If I am not mistaken, then at first when you go from  “Service Order” screen to  “Customer Details” screen, you must be using Redirect URL and setting the URL for Customer Detail screen, so here in URL you need to append the input parameter and pass TRUE. Now when it goes to your customer detail screen your input value will be True and you can use in Save logic.

Solution

Dear Puja Rani,

This worked perfectly !!!!!!

Congratulations !!!

Thanks again for your attention.

Happy to know your issue is solved:)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.