0

Page behaviour

Hi All

I have a page (as opposed to a table) where I can scan or type in a reference in a field and find the record I am looking for. The field is called Scan and it is set a to be a Global variable in memory (browser).

This version doesn't find the record

let a := this;
let b := first(select StockByBin where Scan = a.Scan);

This version does find the record

let a := this.Scan;
let b := first(select StockByBin where Scan = a);

Any ideas why?

Regards John

3 replies

null
    • Fred
    • 5 mths agoTue, November 5, 2024 at 6:02 PM UTC
    • Reported - view

    I can't duplicate it on cloud. Both codes give me the same results. Is Scan a text field?

    • John_Halls
    • 5 mths agoTue, November 5, 2024 at 8:51 PM UTC
    • Reported - view

    Thanks for looking Fred. It’s not a problem. I was just intrigued. I might have a delve sometime. 

    • John_Halls
    • 5 mths agoWed, November 6, 2024 at 8:53 AM UTC
    • Reported - view

    Hi Fred. It's to do with the Binding setting, which makes sense. a :=this will get the record OK but in the select statement a.Scan won't know who's Scan value to take. All in all it's not a bug but something to be aware of.