15
Views
7
Comments
Solved
[Data Grid Extension] Workflow to Sync List Addition Between Two Screens With Automatic Row Generation
data-grid-extension
Reactive icon
Forge asset by Jeetaek Kim
Application Type
Traditional Web

Hi everyone,  

I’ve built a web application in OutSystems with two different screens, and I need some assistance designing a workflow for my use case. Let me describe the scenario:  

On the first screen, I’ve implemented a list where filling out the "Name" field automatically populates other columns (e.g., MS1, MS2, MS3 with their respective dates). These dates are automatically generated in my actual application but are manually inputted in a sample OML I worked on since the data structure is different.  

What I want to achieve is the following:When I add a new row to the list (e.g., "Luke Skywalker") and save the record, new rows should also be added to the second screen's agenda. These rows would include the same name along with the corresponding dates (e.g., one row with "Luke Skywalker" and the date for MS1, another row with "Luke Skywalker" and the date for MS2, and so on).  

How can this be implemented? Is it possible to create a workflow that spans across both screens? Should this be handled using JavaScript, where both Data Grids (from Screen 1 and Screen 2) are passed as input parameters?  

I’d love to hear your ideas or suggestions! Thanks a lot in advance!  

Would you like me to adjust or elaborate on anything specific in this question?

HubSample.oml
2023-10-16 05-50-48
Shingo Lam
Solution

Sorry for late reply.

Please refer to my attached oml. I have removed some of your validation and function to let it work by manually inputting data. Moreover, I also added some of logic to save and show data.

Hope it help

HubSample - edited.oml
UserImage.jpg
T S

Thanks you!!

2023-10-16 05-50-48
Shingo Lam

Hi T S,

Please help to clarify these:

  • 2 screens are opening on different browser tabs?
  • the MS1, MS2, MS3 are the data configuration you have which link to the "Name"?
UserImage.jpg
T S

Hi,

as you can see in the sample oml, there is a navigation tab on the top where you can switch from the list to the agenda.

In the list, there are grouped columns, ms1, ms2, ms3.. in these grouped columns you have a date column. In my original application the data for the dates comes from the api - in my sample oml, the dummy api data i've used doesn't contain such date columns, so we have to fill them in manually and save the list

2023-10-16 05-50-48
Shingo Lam

The approach is to let the data to be reload on tab changed to agenda when there are changes in the list.

You can try the above approach. If cannot, I can take a look at your oml as example

UserImage.jpg
T S

Yeah, I had the same idea - fill in the data in the list and then save the list. After saving the list, there should be an automated sync, that the agenda get new rows (for every MS date a new row) with the new data. Unfortunately I wasn't able to implement this - has anyone a hint for me?

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi,

I'm not really understanding why you connect the question to the Datagrid, and why you talk about syncing 2 screens.

In it's most simple form :

  • what happens on a screen gets saved in the database
  • user goes between the 2 screens by using the navigation, within the same tab
  • at each navigation, a screen runs it's datafetches, so anything done on one screen would be visible in the other
  • your 'list' screen would have logic to save 3 rows in your entity for each name added
  • your 'agenda' screen would just retrieve all records in your entity

Above approach doesn't need any special syncing or refreshing logic ??  So what exactly is different in what you need ?  Doesn't it get saved to the database immediately ?  Do you need it open side by side in 2 separate tabs ? or something else ??

Dorine


2023-10-16 05-50-48
Shingo Lam
Solution

Sorry for late reply.

Please refer to my attached oml. I have removed some of your validation and function to let it work by manually inputting data. Moreover, I also added some of logic to save and show data.

Hope it help

HubSample - edited.oml
UserImage.jpg
T S

Thanks you!!

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