View What Has Been Added To ListAppend

Hello, 

I've bound essentially a Variable that is a List of an Entity to Table on a screen,  I see data in the list being added, but how do i refresh the screen to display the data as it is added to the list?


Thank you,

FrankCLT

Hi FrankCLT,

Can you post some image for we understand better what you need,

and what kind app you use (Normal WEB or Reactive)?


Maybe what you need is refresh your table, on screen:


Regards

Thank you for the speedy reply....We are using Reactive


Here is where i populate the List


This is what it is bound to or I think it is.....I need to refresh this ListTable but don't see a way to refresh.

This is what i thought I was doing...


While editing items in lists it is more efficient to only refresh the affected items in the interface than the entire list. OutSystems provides system actions to manipulate lists. When the list you manipulate is being displayed on the screen, these actions can also refresh the affected elements displayed on the screen right away. To update list items in Reactive Web and Mobile:

1. Display the list on a screen. 

2. Add a button or link that updates the list. 

3. In the action associated with the button or link, drag the Execute Action from the toolbox to the action flow. 

4. Select one of the following system actions to manipulate elements in the list variable bound with the widget displayed on the screen: ? ListAppend ? ListAppendAll ? ListInsert ? ListRemove ? ListClear 

5. The widget automatically displays the updated list.

Hi FrackCLT,

In Reactive web app , have no need to refresh widget it will take care automatically when vaiable is changed.


Regards

Rahul Sahu

Hi FrankCLT,


All you are doing in that screenprint is add a single item to a local variable inside a server action.  There is no way that this will have any effect on what is displayed on your screen.  That local list dies when the server action ends.  You have probably used the same name for a list in your screen and a list inside this action, which has you confused.

So if you want to go the listappend/listremove route, do this inside a screen action (if you are doing reactive, that would be a client action) after having called the server action to update the database.

But why not make it easy on yourself, bind your table to an aggregate or fetch data action, and just refresh that when needed ?


Dorine

Thank you for your reply.   It was recommended by OS to try the ListAppend method.   We are currently doing it similar to the way you mention.  We just wanted to try the ListAppend to experiment.  With the ListAppend, place it in a Client Action, upon executing the Client Action I receive the following error:  Never seen that before....


Thank you,

FrankCLT

Hi Frank,

Can you show what exactly you are doing.  Amd also the full error details from service center.

And if you debug, can you show at what step in the flow your error occurs.


I have added a word doc with print screens....


Thanks again,

Hi Frank,


I dont know where that error is coming from, but as far as I can tell from your word document, you are making the very same mistake again, you are appending inside an action to a local list.  Why ?  Do you understand the scope of variables.  If not, it would be really usefull to take some of the basic training.

Why not put the listappend action right there inside the OnChangeBulkRow action of your screen, in the spot you are now executing PopulateListTable.  That way you can append to the list


As far as that error is concerned, don't the names in there ring a bell to you ??  Again, get more info in service center.  Or for starters, maybe remove the listappend where the error happens and re publish and see if it's gone.


To help you better,

can you share the oml.  For example, what are you doing with the client.linecount in that assign, and what are you doing in the assign after If ??


Solution

Frank,


I made a small sample oml to show how you could do it.


One question, in an earlier screenprint you did a create on the database, you do realise that nothing changes in the database if you only do an ListAppend, right ??


Dorine

Solution

Dorine,

I do appreciate your assistance.  Yes, I do understand no changes to DB.  I am getting an error when opening you oml.

FrankCLT

Ok,


that error is about different versions of environment, not sure we can do anything about that.  But still, you can compare my logic to yours and see what's different.

demo is here


good luck,

Dorine

I do... I see the errors in my way.....You have been a tremendous help, can't thank you enough!