Reading two tables in a page

I’d like to show a list with customers that have payed in a specific month…
I have two tabs, one for customers and one for payments, linked by ID customer.
I tried to do what in the image, but it doesn’t works: it seems in the second block I have read blank records…
Can you help me pleas?
Grazie

It looks like you’re using the same data source table/tab in both screenshots. What are the names of your two tabs?

They are gooClienti and gooPagamenti

Okay, sorry, you did have those two selected correctly in your blocks. So I would simplify things… for example, can you display the two properties in the circaPagament function in two labels? Does that work inside of your loop? If not, then you need to first troubleshoot that.

And how have you tested whether or not app variable varFiltraNome returns a true or false value? It would return a string so that if block may not ever trigger.

Thankyou. No, they are *blanks, as is *blanks the “jj” variable. (and the data are present and they have not to be *blanks…:!).
A question is: is a valid variable the “jj” one in the second block, “for each time of variable jj”??

The logic of the two blocks is:

  • I read the customer tab (gooClienti), first block
  • for each of them I read (in the second block) all the payment records (gooPagamenti) and when it belong to the customer chosen and in the month I look for, I set “true” the parameter “varMesePagato”
  • I come back to the first block and I let the record visible in the data viewer with the green background (if previously in the second block I didn’t found the payment, I set red that variable).
    Maybe in a single page we can’t read two tables simultaneously using the same ‘j’ variable?? I used a second variable, “jj” define in the page, but maybe that doesn’t works properly?

You can use the app variable jj but you initialized it as an empty object and then assigned list items to it from app variable varRecordsPag which is a list. You can’t mix variable types like that; objects are not the same as lists. Delete the create object block and test it again.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.