0

Update Yes/No Slider on one table from slider on another

I'm working on my "order tracking" database and today decided to add another table to make a list of projects that I'm going to manufacture on a daily basis. I would like to switch a "Production Complete" slider on the daily tracker and have it update the corresponding yes/no slider in my "Active Orders" table for that record. How would I go about that?

 

Thanks in advance,

 

Jess

3 replies

null
    • Fred
    • 1 yr ago
    • Reported - view

    First question, how are the list of projects table and Active Orders table related?

      • S&S Woodsmithing
      • Jess_Spiers
      • 1 yr ago
      • Reported - view

      Fred Thanks for the reply. As it sits, I have a table reference of Project List to Active Orders (N:1) in the Project List table.

       

      I'll be the first to admit that I'm a novice when it comes to Ninox and DB building in general.

    • Fred
    • 1 yr ago
    • Reported - view

    In the Trigger after update of Production Complete field, you can put something like:

    if 'Production Complete" then
    'Active Orders'.'yes/no' := true
    end
    

    Line 1 checks the Production Complete field for a "true" or "yes" result. In Ninox you don't need the = "true" part as writing it this way implies that.

    Line 2, will then change the Yes/No field in Active Orders to true. You can also use 1 or "Yes" instead of true, if you brain works better that way.

    Since you said you are beginner, just want to make sure that you have done the 1:N direction properly. You always create the reference field from the many side not the 1 side. So on the many table you only have the option to select 1 record from the other table. The 1 table will show a table and allow you to create a new record in the many table.

Content aside

  • 1 yr agoLast active
  • 3Replies
  • 102Views
  • 2 Following