locked
Passing fields between screens unrelated in HTML Client RRS feed

  • Question

  • I have fields on a browser screen that after selecting a record  I would like to show up on Add Edit screen after doing a tap.  The browser screen is from a view and the Add Edit screen is a table that will never be saved because I will call a stored procedure with the values.

    e.g.

    BrowseAdvisorList(Database view)

    Id, Name, Interest

    1 Advisor1 5000

    2 Advisor2 3000

    AddEdit Screen( CALLS STORED PROCEDURE AdvisorInterest_U(1,5000) )

    1 Advisor1 5000

    Tuesday, May 28, 2013 8:47 PM

Answers

  • Hi,

    You can just create an Add Edit Advisor screen as normal, and then modify the screen content item to display what you want (removing the default content items that display the Advisor details). Then in any custom methods you write, you can always access screen.Advisor.Id / screen.Advisor.Interest (if screen is a parameter) or contentItem.screen.Advisor.Id / contentItem.screen.Advisor.Interest (if contentItem is a parameter).

    Best regards,
    Huy

    • Marked as answer by Kdraper Friday, May 31, 2013 1:05 PM
    Friday, May 31, 2013 1:33 AM

All replies

  • This is a very common scenario and the way to do it is illustrated in a video by Beth Massi here.

    Even though that video demonstrates the concept with the Silverlight client, the same principles apply to the HTML client.  In the HTML client, you can additionally specify the value of the parameter when creating a new screen in the new screen wizard dialog.

    Wednesday, May 29, 2013 2:14 AM
  • Thanks Allen,

    I watched the video but I'm not sure it will work if I am using two unrelated tables.

    I have tried using databind to map customerid between two unrelated screens.  It has not worked but I am not sure my databind url is correct.

    Any thoughts?

    e.g.

    myapp.AddEditCustomer.CustomerId_postRender = function (element, contentItem){
    contentItem.dataBind("screen.vwCustomers(item).CustomerId",
    function (newValue) { contentItem.value = newValue;});
    }; 

     

     

    Wednesday, May 29, 2013 7:03 PM
  • Hi,

    You can just create an Add Edit Advisor screen as normal, and then modify the screen content item to display what you want (removing the default content items that display the Advisor details). Then in any custom methods you write, you can always access screen.Advisor.Id / screen.Advisor.Interest (if screen is a parameter) or contentItem.screen.Advisor.Id / contentItem.screen.Advisor.Interest (if contentItem is a parameter).

    Best regards,
    Huy

    • Marked as answer by Kdraper Friday, May 31, 2013 1:05 PM
    Friday, May 31, 2013 1:33 AM
  • I basically followed your suggestion.  I created a query that returned one record and took as parameters the Id's  and values I wanted to pass.  Then in the created function I transferred the values to the other screen values.

    Thanks

    Friday, May 31, 2013 1:09 PM
  • Hi,

    You can just create an Add Edit Advisor screen as normal, and then modify the screen content item to display what you want (removing the default content items that display the Advisor details). Then in any custom methods you write, you can always access screen.Advisor.Id / screen.Advisor.Interest (if screen is a parameter) or contentItem.screen.Advisor.Id / contentItem.screen.Advisor.Interest (if contentItem is a parameter).

    Best regards,
    Huy

    Hi

    I have a similar situation and would like to know how you do this (see above):

    "then modify the screen content item to display what you want"

    Regards, Mark.


    Mark

    Friday, July 5, 2013 7:02 AM
  • Hi Mark,

    You can try these MSDN articles on the screen designer to modify the screen.

    If you have more specific questions, please let me know more details about:

    • Your entities and their relationships.
    • The screens you want to build and how you want to navigate between them.

    I will try to answer in details.

    Best regards,
    Huy

    Friday, July 5, 2013 5:28 PM