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?

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • record(Kits,number(Choice)).Price

    Steven

    Like
  • 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. 

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

    Like
  • 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

    Like
Like Follow
  • 1 yr agoLast active
  • 4Replies
  • 408Views