0

I can't get a Dynamic Choice to select from a table. It works in other circumstances.

I'm building a dashboard form, and I'm stumped.

I have a Dynamic Choice which returns a value from Column Kit from a table Kits. Works fine. In the Dynamic Choice, the Dynamic Values are "select Kits" and Dynamic Value Name is "Kit". The Dynamic Choice populates.

In a formula box, I want to select a value from this Kits table depending on the dynamic choice. My code is:

let i := Choice;
(select Kits where Kit = i).Price

I get an empty return

As a test, I have a value from Chioce, which is "Dave". If I hard code this in as such:

let i := Choice;
(select Kits where Kit = "Dave").Price

This works fine - I don't know why Ninox isn't making the link. Can you help?

4 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    record(Kits,number(Choice)).Price

    Steven

    • markprince1
    • 2 yrs ago
    • Reported - view

    You're a star. This also fixed a number of formatting issues I've been having. I'm pretty steeped in SQL, but need to get my head in the Ninox idioms. 

    • markprince1
    • 2 yrs ago
    • Reported - view

    Is there somewhere in the manual that explains this - it seems pretty powerful.

    • John_Halls
    • 2 yrs ago
    • Reported - view

    Hi Mark

     

    This is what the manual says:-

    record(tableName, recordId)
    record(tableName, recordId).fieldName
    Use the record function to return the nth record id of a table as a handle.
    Note that recordID is not a position in a sorted view. If a record has been deleted, using that recordID will return a null, since the ID no longer exists and never will again.

     

    Regards John

Content aside

  • 2 yrs agoLast active
  • 4Replies
  • 423Views