View custom property dataset (from named query) not refreshing

sorry, should’ve said it doesn’t think it’s in “perspective” scope (forgot that’s not an official scope)

And now it’s clear that page startup is presumably missing com.inductiveautomation.perspective.gateway.model.PageModel.PAGE :man_facepalming:

is it just me, or does this only work every second refresh? (MSEdge)

could this be a browser issue?

for the life of me I cannot get a page-startup-defined urlParam to consistently apply between refreshes/logins

What’s really funny - if I put a junk value for the urlParam on the end of the actual URL (presumably by design), then every browser refresh will toggle between the two values!

EDIT: seems the instantiation method also only works on every other login :exploding_head:

Y'all might be interested in using the behavior of page titles to detect refreshes:

thanks for that - I gave up on relying on bindings alone, despite my propChange script aversion.

well - i’m embarrased to say - simply adding sleep(1) to the beginning of the page startup script solves the underlying issue. Presumably that’s enough time for the rest of the page props to instantiate. Any other attempt at setting a page.props.urlParams property (for refresh or intial start purposes) was unreliable (an immediate print in the code would work, but page/view components would only occasionally pick the value up). This explains the werdness I thought i was seeing above. Seems pretty buggy to me, but unsure if it’s worth a ticket.

interesting learnings (for me anyway):

  • modifications to page starup script in designer don’t take effect (in designer) until save

  • page.path and page.pageID don’t exist at startup despite the note in the dsigner parameters blurb:

  • this auto-complete hint is wrong (it’s page.props…)
    CleanShot 2025-03-17 at 12.05.54

  • page/view/component startup scripts appear to run in parallel

  • page/view/component startup scripts always execute in designer when a view is opened and by shift > right click > Refresh Browser on a view

  • page/view/component startup scripts only execute once in browser (this is common knowledge, but at odds with designer experience)

    • it’s admittedly a stretch to expect browser refresh behavior to mach designer “refresh" behavior