0

problem returning an ID

I have the formula:

(select shipping)[actuel = true].ID

and It return "0" nor nothing

but if I change the .ID to another field, it work perfectly!

I tried with number() but nothing work...

Thanks!

4 replies

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

    Did you try with first() ?

    first(select shipping where actuel = true).ID)

    Didn't try myself (lack of time), maybe a bit tweaking is needed. 

    • BugTrapper
    • 4 yrs ago
    • Reported - view

    Try .Nr instead of .ID

    • plafontaine44
    • 4 yrs ago
    • Reported - view

    The problem is that I only have one entry that match ''actuel'' and it return me multiple entry...it s like it doesnt take care of '' actuel = true'' condition...

    pretty weird... if I use first it show me the first but not mean it s the good one... and when I use this field value in the display formula of another field, it wont show me anything...it seem to consider it as multiple value...

    • Mconneen
    • 4 yrs ago
    • Reported - view

    @Plafontaine44... select will always return a record set.. even if it returns a record set of one row.    If you know that logically you should only get one row.. then yes.. use first(select ......).

    If you need logic such that if you have multiples it is an error..  you can do a cnt(select ......) and evaluate the return value. 

Content aside

  • 4 yrs agoLast active
  • 4Replies
  • 1318Views