Lightswitch HTML Client - How do you pass a value from one screen to another?

My question in particular is based upon a view screen, where I have a unique ID and I want to pass this to an Add/Edit screen. So rather than the user having to type this out every time, they can simply just click on the details picker plus symbol and selected the value(s) associated with that.

So for example I have a CustomerID which is 1, and they have made an order (OrderID 100). On this Order I want to add an item they have purchased and display it onto the OrdersViewScreen. Within Lightswitch I have an AddDeliveryLine button which takes me to this particular Add screen. I have set up a query based on the CustomerTable, which asks the user to search by their CustomerID… When I type in 1 myself it will load up the items the customer is awaiting within the CustomerOrders details picker.


The values need passing within JavaScript however the following methods ive tried have not worked:

myapp.AddEditDeliveryLine.CustomerID_postRender = function (element, contentItem) {

    contentItem.screen.CustomerID =

myapp.ViewDeliveryNote.ShowAddEditDeliveryLine_canExecute = function (screen) {
    return screen.CustomerID;
myapp.ViewDeliveryNote.ShowAddEditDeliveryLine _execute = function (screen) {
    return myapp.showAddEditDeliveryLine(screen.CustomerID);

I’ve added a print screen of what I am trying to accomplish. Thanks for any help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
Many different ways one of the best ways is by using the example shown @

In your List Detail, you need to create a Data Item to store the User Name. In the Properties for that Data Item, you then need to check "Is Parameter".
When you call your second screen from the code in your SearchUserInformationLists screen, you pass the value of that Data Item to it.


The screen Parameters should be the first items in your list of Data Items on the left of the Screen Designer. You can pass more than one parameter and the order that you pass them in is the order in which they are listed in your Data Item list.

this.Application.ShowZeiterfassungsListDetail(this.Param1, this.Param2, this.Param3);

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.