locked
Passing a query parameter through an HTML client RRS feed

  • Question

  • Hi everyone,

    I'm wondering if I've missed something obvious.  I have a table called Parent that has a zero-to-one relationship with a Child table.

    On the Parent's View screen I'm trying to determine whether the child record exists or not.  To do this I wrote a query based off the Child table that takes the Parent ID as a parameter.

    In my Parent's View screen I have code like this:

    myapp.ViewParentTable.created = function (screen) {

        var cnt = myapp.activeDataWorkspace.ApplicationData.HasKids(screen.ParentTable.ID).execute().then(
            function(results) {
                if (results.results.length >= 0) {
                    msls.showMessageBox("has children");
                }
            },
            function(error) {
                alert(error);
            });

    };

    In stepping through the code however it seems that at runtime the screen.ParentTable.ID value is null, which I don't understand?


    Monday, March 24, 2014 10:57 PM

Answers

All replies