Hi - Further to our migration to Cache from Pick, I am trying to call a Pick subroutine from a Zen Page using data fields that are not bound to a database. These are just text fields (such as dates, no of passengers, no of nights etc). Any help in how to do this would be much appreciated. There are many examples in SAMPLES but the data fields are binded to databases and use client methods. I am able to use client methods to call the Pick subroutine but unable to pass the data fields to Pick.
It has been a while since I've used Zen, but couldn't you just grab the value of the fields from either JavaScript or your Zen method? Both of those should have a .getValue() once you have the control. You can then pass those values to your Pick routine.
On Thursday, October 18, 2012 10:35:53 AM, ChrisB wrote:
> Hi - Further to our migration to Cache from Pick, I am trying to call
> a Pick subroutine from a Zen Page using data fields that are not bound
> to a database. These are just text fields (such as dates, no of
> passengers, no of nights etc). Any help in how to do this would be
> much appreciated. There are many examples in SAMPLES but the data
> fields are binded to databases and use client methods. I am able to
> use client methods to call the Pick subroutine but unable to pass the
> data fields to Pick.
> Many thanks ChrisB
> --
> You received this message because you are subscribed to the Google
> Groups "InterSystems: MV Community" group.
> To post to this group, send email to CacheMV@googlegroups.com
> To unsubscribe from this group, send email to
> CacheMV-unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/CacheMV?hl=en
Hi Chris -- I have not been able to pay much attention lately, but I
did see you posted to the MV list as well as this one. If you get a
chance, these are of varying quality and varying usefulness to someone
outside of my project team, but you might want to look at the little
videos I posted here
http://www.youtube.com/watch?v=UH1YyEtwYrA&list=PLB5C62FFDD1529908&fe...
Even if you do not want to do a dataBinding on a form field, which is
what we typically do, you can still use the Model-View-Controller
approach by defining a dataController. Then instead of the binding
being in the form in the XData section, you can move the value of the
form field to the relevant controller field, something like this
If you do not want to use an MVC pattern, then you would need to do
the writes on the server by using a Zen Method. I would not go that
route, but it could be done, passing components, such as the form, to
the server, then reading and writing records in an old-style way or by
using object writes. You will need to handle concurrency, so I would
recommend object writes.,
I hope this helps. By the way, if you do not want to do a data binding
to a field in a record so that they are not so tightly coupled, you
can also use the MVC approach with a Zen object data model class. We
sometimes bind to the file/field but often to a
%ZEN.DataModel.ObjectDataModel class which can span multiple records.
I hope this helps. Let me know if you have questions about the videos
too. --dawn
On Thu, Oct 18, 2012 at 11:35 AM, ChrisB <cbat...@blueyonder.co.uk> wrote:
> Hi - Further to our migration to Cache from Pick, I am trying to call a Pick
> subroutine from a Zen Page using data fields that are not bound to a
> database. These are just text fields (such as dates, no of passengers, no of
> nights etc). Any help in how to do this would be much appreciated. There are
> many examples in SAMPLES but the data fields are binded to databases and use
> client methods. I am able to use client methods to call the Pick subroutine
> but unable to pass the data fields to Pick.
> Many thanks ChrisB
> --
> You received this message because you are subscribed to the Google Groups
> "InterSystems: MV Community" group.
> To post to this group, send email to CacheMV@googlegroups.com
> To unsubscribe from this group, send email to
> CacheMV-unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/CacheMV?hl=en
I would create a server side method on your ZEN page that then makes the call to the MV Basic subroutine. For example
Method GetSomeInfo(TripDate,NumPassengers,NumNights) As %String [ Language = mvbasic, ZenMethod ]
{
Call MyGetInfoSub(TripDate,NumPassengers,NumNights,Info)
Return Info
* or if this is not a callable subroutine
DATA TripDate
DATA NumPassengers
DATA NumNights
Execute "GetInfoProgram" capturing ouput
* parse output to get the Info
Return Info
}
If this was something you had to do on a regular basis then I would put this in a Utility Class that extends ZENPage and add that class to the inheritance of the zenpage you are working on. Alternative you could use this utility class as a template for your web pages. You can read up on Zen page templates in the documentation.
Richard S Taylor
Sales Engineer
InterSystems Corporation
Office: 443-340-8614
FAX: 440-815-5805
[image003]
From: intersystems-mv@googlegroups.com [mailto:intersystems-mv@googlegroups.com] On Behalf Of ChrisB
Sent: Thursday, October 18, 2012 12:36 PM
To: InterSystems-MV@googlegroups.com
Subject: [InterSystems-MV] Advice on calling a Pick subroutine from a Zen Page
Hi - Further to our migration to Cache from Pick, I am trying to call a Pick subroutine from a Zen Page using data fields that are not bound to a database. These are just text fields (such as dates, no of passengers, no of nights etc). Any help in how to do this would be much appreciated. There are many examples in SAMPLES but the data fields are binded to databases and use client methods. I am able to use client methods to call the Pick subroutine but unable to pass the data fields to Pick.
Many thanks ChrisB
--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To post to this group, send email to CacheMV@googlegroups.com<mailto:CacheMV@googlegroups.com>
To unsubscribe from this group, send email to CacheMV-unsubscribe@googlegroups.com<mailto:CacheMV-unsubscribe@googlegroup s.com>
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en
Hi and thanks to all those who responded. I have now been able to call the Pick Subroutine with no difficulty though am left with the problem of how to display the return data from the Pick sub routine. Basically a large dynamic array is returned containing info on hotel availability and prices such as;
On Thursday, 18 October 2012 17:35:53 UTC+1, ChrisB wrote: > Hi - Further to our migration to Cache from Pick, I am trying to call a > Pick subroutine from a Zen Page using data fields that are not bound to a > database. These are just text fields (such as dates, no of passengers, no > of nights etc). Any help in how to do this would be much appreciated. There > are many examples in SAMPLES but the data fields are binded to databases > and use client methods. I am able to use client methods to call the Pick > subroutine but unable to pass the data fields to Pick.
I'm not sure if this will work with passing from MV or not but you could try returning the variable to Zen as %ArrayOfDataTypes this would allows you to loop through the attributes something like:
For i=1:1:cboxes.Count() {
d rec.Classes.InsertAt(cboxes.GetAt(i),i)
}
From: ChrisB [mailto:cbat...@blueyonder.co.uk]
Sent: Friday, October 19, 2012 1:09 PM
To: InterSystems-MV@googlegroups.com
Subject: [InterSystems-MV] Re: Advice on calling a Pick subroutine from a Zen Page
Hi and thanks to all those who responded. I have now been able to call the Pick Subroutine with no difficulty though am left with the problem of how to display the return data from the Pick sub routine. Basically a large dynamic array is returned containing info on hotel availability and prices such as;
Once again any help in coding this would be much appreciated, thanks Chris
On Thursday, 18 October 2012 17:35:53 UTC+1, ChrisB wrote:
Hi - Further to our migration to Cache from Pick, I am trying to call a Pick subroutine from a Zen Page using data fields that are not bound to a database. These are just text fields (such as dates, no of passengers, no of nights etc). Any help in how to do this would be much appreciated. There are many examples in SAMPLES but the data fields are binded to databases and use client methods. I am able to use client methods to call the Pick subroutine but unable to pass the data fields to Pick.
Many thanks ChrisB
--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To post to this group, send email to CacheMV@googlegroups.com<mailto:CacheMV@googlegroups.com>
To unsubscribe from this group, send email to CacheMV-unsubscribe@googlegroups.com<mailto:CacheMV-unsubscribe@googlegroup s.com>
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en
Richard S Taylor
Sales Engineer
InterSystems Corporation
Office: 443-340-8614
FAX: 440-815-5805
[image003]
From: intersystems-mv@googlegroups.com [mailto:intersystems-mv@googlegroups.com] On Behalf Of ChrisB
Sent: Friday, October 19, 2012 1:09 PM
To: InterSystems-MV@googlegroups.com
Subject: [InterSystems-MV] Re: Advice on calling a Pick subroutine from a Zen Page
Hi and thanks to all those who responded. I have now been able to call the Pick Subroutine with no difficulty though am left with the problem of how to display the return data from the Pick sub routine. Basically a large dynamic array is returned containing info on hotel availability and prices such as;
Once again any help in coding this would be much appreciated, thanks Chris
On Thursday, 18 October 2012 17:35:53 UTC+1, ChrisB wrote:
Hi - Further to our migration to Cache from Pick, I am trying to call a Pick subroutine from a Zen Page using data fields that are not bound to a database. These are just text fields (such as dates, no of passengers, no of nights etc). Any help in how to do this would be much appreciated. There are many examples in SAMPLES but the data fields are binded to databases and use client methods. I am able to use client methods to call the Pick subroutine but unable to pass the data fields to Pick.
Many thanks ChrisB
--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To post to this group, send email to CacheMV@googlegroups.com<mailto:CacheMV@googlegroups.com>
To unsubscribe from this group, send email to CacheMV-unsubscribe@googlegroups.com<mailto:CacheMV-unsubscribe@googlegroup s.com>
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en
Thanks for the link but still unable to find a way of transferring the data returned from Pick into a Grid or similar control. The data returned from Pick is pure text data and not bound to any database. I just need to know how to extract this data and place it in a zen control. so that it can be displayed on a zen form. Apologies but I do come from a Pick background and my knowledge of java is rather limited.
Best
Chris
From: Rich Taylor Sent: Friday, October 19, 2012 7:02 PM
To: intersystems-mv@googlegroups.com Subject: RE: [InterSystems-MV] Re: Advice on calling a Pick subroutine from a Zen Page
Chris,
Here is a link to a Caché tip we released some time ago that my help you with this.
Richard S Taylor
Sales Engineer
InterSystems Corporation
Office: 443-340-8614
FAX: 440-815-5805
From: intersystems-mv@googlegroups.com [mailto:intersystems-mv@googlegroups.com] On Behalf Of ChrisB
Sent: Friday, October 19, 2012 1:09 PM
To: InterSystems-MV@googlegroups.com
Subject: [InterSystems-MV] Re: Advice on calling a Pick subroutine from a Zen Page
Hi and thanks to all those who responded. I have now been able to call the Pick Subroutine with no difficulty though am left with the problem of how to display the return data from the Pick sub routine. Basically a large dynamic array is returned containing info on hotel availability and prices such as;
And I would like it to go into a grid on the Zen Page as such;
Hotel Name Date Room Type Price
Mayfair 01/11/12 TWIN ROOM 80.00
DOUBLE ROOM 75.00
Cumberland 01/11/12 TWIN STANDARD 90.00
Once again any help in coding this would be much appreciated, thanks Chris
On Thursday, 18 October 2012 17:35:53 UTC+1, ChrisB wrote:
Hi - Further to our migration to Cache from Pick, I am trying to call a Pick subroutine from a Zen Page using data fields that are not bound to a database. These are just text fields (such as dates, no of passengers, no of nights etc). Any help in how to do this would be much appreciated. There are many examples in SAMPLES but the data fields are binded to databases and use client methods. I am able to use client methods to call the Pick subroutine but unable to pass the data fields to Pick.
Many thanks ChrisB
-- You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To post to this group, send email to CacheMV@googlegroups.com
To unsubscribe from this group, send email to CacheMV-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en
checked for viruses and spam by CanIt.
http://www.canit.3d.net.uk/ -- You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To post to this group, send email to CacheMV@googlegroups.com
To unsubscribe from this group, send email to CacheMV-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en
Can you send me a sample of the data returned to the webpage? I assume that this is some kind of structured data. Is it in dynamic array form? Also can you provide details on how you are returning this to your page?
If this is sensitive you can send it as a private email to me direct.
Regards,
Rich Taylor
Richard Taylor
Sales Engineer - InterSystems
Phone: 443-340-8614
email: rich.Tay...@InterSystems.com
-----Original Message-----
From: Chris B [chr...@datam.co.uk]
Received: Monday, 22 Oct 2012, 7:43am
To: intersystems-mv@googlegroups.com [intersystems-mv@googlegroups.com]
Subject: Re: [InterSystems-MV] Re: Advice on calling a Pick subroutine from a Zen Page
Hi Rich,
Thanks for the link but still unable to find a way of transferring the data returned from Pick into a Grid or similar control. The data returned from Pick is pure text data and not bound to any database. I just need to know how to extract this data and place it in a zen control. so that it can be displayed on a zen form. Apologies but I do come from a Pick background and my knowledge of java is rather limited.
Best
Chris
From: Rich Taylor<mailto:Rich.Tay...@intersystems.com>
Sent: Friday, October 19, 2012 7:02 PM
To: intersystems-mv@googlegroups.com<mailto:intersystems-mv@googlegroups.com>
Subject: RE: [InterSystems-MV] Re: Advice on calling a Pick subroutine from a Zen Page
Chris,
Here is a link to a Caché tip we released some time ago that my help you with this.
Richard S Taylor
Sales Engineer
InterSystems Corporation
Office: 443-340-8614
FAX: 440-815-5805
[image003]
From: intersystems-mv@googlegroups.com [mailto:intersystems-mv@googlegroups.com] On Behalf Of ChrisB
Sent: Friday, October 19, 2012 1:09 PM
To: InterSystems-MV@googlegroups.com
Subject: [InterSystems-MV] Re: Advice on calling a Pick subroutine from a Zen Page
Hi and thanks to all those who responded. I have now been able to call the Pick Subroutine with no difficulty though am left with the problem of how to display the return data from the Pick sub routine. Basically a large dynamic array is returned containing info on hotel availability and prices such as;
Once again any help in coding this would be much appreciated, thanks Chris
On Thursday, 18 October 2012 17:35:53 UTC+1, ChrisB wrote:
Hi - Further to our migration to Cache from Pick, I am trying to call a Pick subroutine from a Zen Page using data fields that are not bound to a database. These are just text fields (such as dates, no of passengers, no of nights etc). Any help in how to do this would be much appreciated. There are many examples in SAMPLES but the data fields are binded to databases and use client methods. I am able to use client methods to call the Pick subroutine but unable to pass the data fields to Pick.
Many thanks ChrisB
--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To post to this group, send email to CacheMV@googlegroups.com<mailto:CacheMV@googlegroups.com>
To unsubscribe from this group, send email to CacheMV-unsubscribe@googlegroups.com<mailto:CacheMV-unsubscribe@googlegroup s.com>
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en checked for viruses and spam by CanIt.
http://www.canit.3d.net.uk/ --
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To post to this group, send email to CacheMV@googlegroups.com
To unsubscribe from this group, send email to CacheMV-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en
--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To post to this group, send email to CacheMV@googlegroups.com
To unsubscribe from this group, send email to CacheMV-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en