closed
Public

Hi,

I’ve written a Page Loaded script that should

1. delete all the rows from a table.

2. Loop through a source data table and if an element matches a global variable, append a row to the just emptied table and copy some of the data from the source table to the the new row.

I’ve implemented this as two loops (interval=0). First to clear the table and second to append new data.

Instead of running consecutively, they appear to be running concurrently and stepping on each other. Is this normal behavior and , if so, how do I get around it?

How do I use append row for this? Can I use variables separated by commas in the row data area or do I have to create a blank row and then copy each cell?

Thanks

Alan

3 answers

The sibling two loops are executed concurrently because of the current implementation of looping. This is a known limitation and you can work around it like this:

Meanwhile we may remove this limitation in the future.

As for appending the row to table, you can use properties separated by commas.

#1

It appears you cannot delete all the rows. Excecution terminates sometime before you get to 0. The exact number depends upon the # of rows in the table (height of the table) in the ForeUI designer.

It looks like deleting a row is not the same as deleting a row of data though it should be. The objective is to empty the table then add data. Is there a better way to do this?

Also, in the code above, the loop gets re-evaluated each time throught so the moment you add a row, it gets deleted.

#2

Deleting the row will reduce the table height and delete the data as well.

You could set a flag to break the loop when all rows are removed. Below is a working example (remove all rows and then add a new row).

If you want to empty the table cell instead of removing the row, you can use the “Set Table Cell Value” action and specify the new value to “”

#3

This question is now closed