none
HTML Client Pass Local properties values between Screens RRS feed

  • Question

  • Hi

    I have 5 local properties hooked to query parameters and I would like to pass those values to another screen by click on a search button. The problem I'm having is the local property is saying it is undefined in the JavaScript. I'm using screen.propertyname and I have also tried screen.screenname.propertyname. If someone would have some sample code for both the sending screen and the screen receiving those values it would be helpful.

    thanks

    leonard

    Friday, May 3, 2013 11:43 AM

Answers

  • Hi Leonard,

    The screen local properties can be accessed by screen.propertyName, where propertyName is the name you see on the screen members tree on the left hand side. For example in this case:

    The code to access the screen properties looks like this

    myapp.Browse.SearchCustomers_execute = function (screen) {
        if (!screen.Country || !screen.City) {
            return msls.showMessageBox("Country and City are required.", {
                title: "Missing filters"
            });
        } else {
            return myapp.showSearchCustomersByCountryAndCity(
    screen.Country, screen.City); } };

    As for passing the parameters, on the target screen, you'd want to make sure that the screen property is marked as Parameter. For example:

    Once you have that, you can invoke myapp.showMyScreen with the parameters passed in. See code example above, bottom part.

    Here's a sample app if you're interested. http://sdrv.ms/12czqTR

    Best regards,
    Huy

    • Marked as answer by Len Murray1 Tuesday, May 7, 2013 11:12 AM
    Tuesday, May 7, 2013 2:31 AM

All replies

  • Hi Leonard,

    The screen local properties can be accessed by screen.propertyName, where propertyName is the name you see on the screen members tree on the left hand side. For example in this case:

    The code to access the screen properties looks like this

    myapp.Browse.SearchCustomers_execute = function (screen) {
        if (!screen.Country || !screen.City) {
            return msls.showMessageBox("Country and City are required.", {
                title: "Missing filters"
            });
        } else {
            return myapp.showSearchCustomersByCountryAndCity(
    screen.Country, screen.City); } };

    As for passing the parameters, on the target screen, you'd want to make sure that the screen property is marked as Parameter. For example:

    Once you have that, you can invoke myapp.showMyScreen with the parameters passed in. See code example above, bottom part.

    Here's a sample app if you're interested. http://sdrv.ms/12czqTR

    Best regards,
    Huy

    • Marked as answer by Len Murray1 Tuesday, May 7, 2013 11:12 AM
    Tuesday, May 7, 2013 2:31 AM
  • Hello HUY

    Thank you for taking the time to answer my quest and have a great day.

    leonard

    Tuesday, May 7, 2013 11:13 AM
  • Thank you Huy for making a great example that is easy to follow.

    BillNew

    DirectShow Filter Graph Spy: http://alax.info/blog/777 Extremely helpful for finding deep details for DirectShow Graphs.

    Thursday, May 29, 2014 10:15 PM