ListAppend is not working as expected

Expectation: From the picture below. I have a web block contains a table showing PayeeList and a button links to Popup_PayeeSearch, where I can select and pass an ID back to the web block and the action on the left will ListAppend the GetPayeeById2 into PayeeList so the list actually accumulates.


Result: There is always only the last selected record in the PayeeList. It looks like the PayeeList either didn't persist in every request, or the ListAppend overwrite the PayeeList where it is more likely to be the one before? Totally no idea why it didn't persist. Thank you!


Hello Stephen,

Did you debug your code? If so, When your OnNotify action is called, what is inside the local list? The previous item is there? 

Are you append to the local list or to the Table Records List? 

The first ajax refresh is not necessary.

Cheers

Eduardo Jauch wrote:

Hello Stephen,

Did you debug your code? If so, When your OnNotify action is called, what is inside the local list? The previous item is there? 

Are you append to the local list or to the Table Records List? 

The first ajax refresh is not necessary.

Cheers

Thanks for your comment!

1. The list could have something depending on whether the action is Creating or Updating.

2. No, every time when I select the new item, the list will always be only with the just selected item, but nothing else.

3. I actually tried both, both seems to work the same way. The table requires the Source Record List to be the PayeeList.

Could you provide a minimum working module that reproduces the problem, so that we can take a look?

Cheers.

P.S.

If you append the item to the TsbleRecord.List, and after ajax refresh the TableRecordd, it will be buildbagain and will replace its internal list with the one associated with the source.

So, you can append to the source and ajax refresh the TabeRecords, or you can append directly to the TableRecords list, without ajax refreshing the Table records (the ListAppend will Ajax Refresh the new line automatically), depending on your codem

Eduardo Jauch wrote:

P.S.

If you append the item to the TsbleRecord.List, and after ajax refresh the TableRecordd, it will be buildbagain and will replace its internal list with the one associated with the source.

So, you can append to the source and ajax refresh the TabeRecords, or you can append directly to the TableRecords list, without ajax refreshing the Table records (the ListAppend will Ajax Refresh the new line automatically), depending on your codem

I only want it to work now so I focus on Listappend the Local Variable 'PayeeList' now

I got rid all the ajax refresh. Listappend PayeeList. It still only shows one record everytime I select a Payee. :(

Stephen Li wrote:

Eduardo Jauch wrote:

P.S.

If you append the item to the TsbleRecord.List, and after ajax refresh the TableRecordd, it will be buildbagain and will replace its internal list with the one associated with the source.

So, you can append to the source and ajax refresh the TabeRecords, or you can append directly to the TableRecords list, without ajax refreshing the Table records (the ListAppend will Ajax Refresh the new line automatically), depending on your codem

I only want it to work now so I focus on Listappend the Local Variable 'PayeeList' now

I got rid all the ajax refresh. Listappend PayeeList. It still only shows one record everytime I select a Payee. :(

Without looking into your code it will be difficult to help you...


use refresh data of GetPayeeById2  aggregate before PayeeList refresh

Amreen Shaikh wrote:

use refresh data of GetPayeeById2  aggregate before PayeeList refresh

Thanks for your response! Sorry I am not quite sure what you mean here.

Eduardo Jauch wrote:

Stephen Li wrote:

Eduardo Jauch wrote:

P.S.

If you append the item to the TsbleRecord.List, and after ajax refresh the TableRecordd, it will be buildbagain and will replace its internal list with the one associated with the source.

So, you can append to the source and ajax refresh the TabeRecords, or you can append directly to the TableRecords list, without ajax refreshing the Table records (the ListAppend will Ajax Refresh the new line automatically), depending on your codem

I only want it to work now so I focus on Listappend the Local Variable 'PayeeList' now

I got rid all the ajax refresh. Listappend PayeeList. It still only shows one record everytime I select a Payee. :(

Without looking into your code it will be difficult to help you...


I have never done this so I am not sure what to do to show you what I am stuck in :-/ I think this seems to be a very basic operation with ListAppend how can it go this wrong .. lol

Stephen Li wrote:

Eduardo Jauch wrote:

Stephen Li wrote:

Eduardo Jauch wrote:

P.S.

If you append the item to the TsbleRecord.List, and after ajax refresh the TableRecordd, it will be buildbagain and will replace its internal list with the one associated with the source.

So, you can append to the source and ajax refresh the TabeRecords, or you can append directly to the TableRecords list, without ajax refreshing the Table records (the ListAppend will Ajax Refresh the new line automatically), depending on your codem

I only want it to work now so I focus on Listappend the Local Variable 'PayeeList' now

I got rid all the ajax refresh. Listappend PayeeList. It still only shows one record everytime I select a Payee. :(

Without looking into your code it will be difficult to help you...


I have never done this so I am not sure what to do to show you what I am stuck in :-/ I think this seems to be a very basic operation with ListAppend how can it go this wrong .. lol

If you can, attach here your oml, or send me through private message if you don't want it to be publicly available here in the forum.

If the objective is to append id's to the list, the overall look of your code does not seem wrong, but without looking to the assignments, sources, etc, it's not possible to tell you what's wrong, because it is probably a small detail that is not visible in your original post.

Cheers

Eduardo Jauch wrote:

Stephen Li wrote:

Eduardo Jauch wrote:

Stephen Li wrote:

Eduardo Jauch wrote:

P.S.

If you append the item to the TsbleRecord.List, and after ajax refresh the TableRecordd, it will be buildbagain and will replace its internal list with the one associated with the source.

So, you can append to the source and ajax refresh the TabeRecords, or you can append directly to the TableRecords list, without ajax refreshing the Table records (the ListAppend will Ajax Refresh the new line automatically), depending on your codem

I only want it to work now so I focus on Listappend the Local Variable 'PayeeList' now

I got rid all the ajax refresh. Listappend PayeeList. It still only shows one record everytime I select a Payee. :(

Without looking into your code it will be difficult to help you...


I have never done this so I am not sure what to do to show you what I am stuck in :-/ I think this seems to be a very basic operation with ListAppend how can it go this wrong .. lol

If you can, attach here your oml, or send me through private message if you don't want it to be publicly available here in the forum.

If the objective is to append id's to the list, the overall look of your code does not seem wrong, but without looking to the assignments, sources, etc, it's not possible to tell you what's wrong, because it is probably a small detail that is not visible in your original post.

Cheers

Im really not sure how to do it, i think this is the best that I can do atm... Really thanks for your help. Please let me know any additional information that I can provide to help.

Hi,

This is not enough. The ideal is to you to save the OML (Module->Export->Save As) and than when answering here, attach the file (in the Choose file button bellow the Quick Reply box).

Anyway, I am attaching one that mimics what you are doing (or at least what I understood you are doing).
It works. You can test here: https://jauch.outsystemscloud.com/AddItemToLocalListInWB/

Compare with your code to find the problem.

P.S. In O11, I tend to use the Modal instead of the Popup, as the late is a RichWidgets and I prefer to avoid using it most I can...

Cheers.

Eduardo Jauch wrote:

Hi,

This is not enough. The ideal is to you to save the OML (Module->Export->Save As) and than when answering here, attach the file (in the Choose file button bellow the Quick Reply box).

Anyway, I am attaching one that mimics what you are doing (or at least what I understood you are doing).
It works. You can test here: https://jauch.outsystemscloud.com/AddItemToLocalListInWB/

Compare with your code to find the problem.

P.S. In O11, I tend to use the Modal instead of the Popup, as the late is a RichWidgets and I prefer to avoid using it most I can...

Cheers.

Thanks Eduardo, I will get back to this question soon.


Really sorry for the pro-longed waiting for my response and sorry for costing all your times. Eventually my colleague pointed out that I somehow had a link embracing the whole web block that caused the issue.... Though this seems to be a dumb mistake, hope no others will be tricked in the future since the system cannot detect this kind of mistake.