0

Compare tables

Hallo,

I m stuck on a problem with Ninox.

I have a database with 2 tables A & B.

Each table has lets say 5 record sets.

I want from table A view each record set in view mode. Got that working.

From table A & B I want compare field 1 of each table. Table B field 1 can have multiple of the same numbers in field 1. If table A field 1 = table B field 1 then table B field 1 shall be displayed in the view until all same table B field 1 records are displayed. Table B field 1 may 30 record sets.

Any idea how I could get this working ? Tnx in advance.

12 replies

null
    • Fred
    • 3 days ago
    • Reported - view

    What kind of data is in field1 from either table? Can you share a sample of the data from each table?

      • horst_droege
      • 2 days ago
      • Reported - view

       tnx for response Fred.

      Either table field 1 is a number. I have attached an Excel file showing some sample record sets.

      tnx Horst

      • horst_droege
      • 2 days ago
      • Reported - view

       

      Here is in NINOX what I m play around with.

    • Fred
    • 2 days ago
    • Reported - view

    None of the records Table B field 1 has more than 1 number in it. You make is sound like it could contain multiple sets of numbers, or even an array.

    If the data in Table B is what it will look like, try this in the view:

    let t := this;
    select B where Reference = t.Reference
    

    Is there a reason why you don't create a reference field in B to A? So you don't have do any selects in the future.

      • horst_droege
      • 2 days ago
      • Reported - view

       Hi Fred,

       

      tnx for reply.

      I table B is eg reference 9010531 (ID 1, 2, 3) three times. With other references they may be there 10x. As in table A the reference will appear only one time.

      These my first steps in Ninox. So I m not familiar what and how to do. Reading, tutorial, just building up my knowledge. 

      Took me also long in LibreOffice, but have it working there. But with Ninox I m a bit stuck now. So any suggestion is helpful.

      • Fred
      • 2 days ago
      • Reported - view

       so did my suggestion work?

      • horst_droege
      • 2 days ago
      • Reported - view

       Hi Fred,

      no, but I m sure I did something wrong with it. Will try in a day or so again when my mind is fresh for it.

      • Fred
      • 2 days ago
      • Reported - view

       This is what I get:

      • horst_droege
      • yesterday
      • Reported - view

       Hi Fred,

      thats what I aiming for. Excellent. I m sure I did something wrong. Will in a quite moment try again.

      regards

      • horst_droege
      • yesterday
      • Reported - view

       

      On my table B view all records are shown. However, I dont get an error message.

      • horst_droege
      • yesterday
      • Reported - view

       Yesssss, I got it now. Tnx Fred.

    • Fred
    • 7 hrs ago
    • Reported - view

    If you feel like your questions have been answered, please take a moment and mark the post answered.

Content aside

  • 7 hrs agoLast active
  • 12Replies
  • 40Views
  • 2 Following