Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Advice on calling a Pick subroutine from a Zen Page
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ChrisB  
View profile  
 More options Oct 18 2012, 12:35 pm
From: ChrisB <cbat...@blueyonder.co.uk>
Date: Thu, 18 Oct 2012 09:35:53 -0700 (PDT)
Local: Thurs, Oct 18 2012 12:35 pm
Subject: 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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Warner  
View profile  
 More options Oct 18 2012, 12:45 pm
From: Jason Warner <jas...@brashers.com>
Date: Thu, 18 Oct 2012 10:45:25 -0600
Local: Thurs, Oct 18 2012 12:45 pm
Subject: Re: [InterSystems-MV] Advice on calling a Pick subroutine from a Zen Page
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.

Jason


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dawn Wolthuis  
View profile  
 More options Oct 18 2012, 1:02 pm
From: Dawn Wolthuis <dw...@tincat-group.com>
Date: Thu, 18 Oct 2012 12:02:49 -0500
Local: Thurs, Oct 18 2012 1:02 pm
Subject: Re: [InterSystems-MV] Advice on calling a Pick subroutine from a Zen Page
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

   controller = zen('mySource');
   myValue = zen('myScreenField').getValue();
   controller.setDataByName('MyField', myValue);
...
   controller.Save();

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

--
Dawn M. Wolthuis

Take and give some delight today


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rich Taylor  
View profile  
 More options Oct 18 2012, 1:24 pm
From: Rich Taylor <Rich.Tay...@intersystems.com>
Date: Thu, 18 Oct 2012 17:24:37 +0000
Local: Thurs, Oct 18 2012 1:24 pm
Subject: RE: [InterSystems-MV] Advice on calling a Pick subroutine from a Zen Page

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

  image001.jpg
4K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ChrisB  
View profile   Translate to Translated (View Original)
 More options Oct 19 2012, 1:08 pm
From: ChrisB <cbat...@blueyonder.co.uk>
Date: Fri, 19 Oct 2012 10:08:32 -0700 (PDT)
Local: Fri, Oct 19 2012 1:08 pm
Subject: 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;

    Mayfair Hilton]01/11/12]TWIN ROOM\DOUBLE ROOM]80.00\75.00
    Cumberland]01/11/12]TWIN STANDARD]DELUXE]90.00\95.00
    Ambassador]01/11/12]LUXURY]120.00

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josh Barney  
View profile  
 More options Oct 19 2012, 1:19 pm
From: Josh Barney <J...@healthpac.net>
Date: Fri, 19 Oct 2012 13:19:51 -0400
Local: Fri, Oct 19 2012 1:19 pm
Subject: RE: [InterSystems-MV] Re: Advice on calling a Pick subroutine from a Zen Page

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;

    Mayfair Hilton]01/11/12]TWIN ROOM\DOUBLE ROOM]80.00\75.00
    Cumberland]01/11/12]TWIN STANDARD]DELUXE]90.00\95.00
    Ambassador]01/11/12]LUXURY]120.00

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<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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rich Taylor  
View profile  
 More options Oct 19 2012, 2:02 pm
From: Rich Taylor <Rich.Tay...@intersystems.com>
Date: Fri, 19 Oct 2012 18:02:36 +0000
Local: Fri, Oct 19 2012 2:02 pm
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.

https://sites.google.com/site/intersystemsmv/home/a-cache-of-tips/wor...

You can access the entire library of tips at:

https://sites.google.com/site/intersystemsmv/home/a-cache-of-tips

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;

    Mayfair Hilton]01/11/12]TWIN ROOM\DOUBLE ROOM]80.00\75.00
    Cumberland]01/11/12]TWIN STANDARD]DELUXE]90.00\95.00
    Ambassador]01/11/12]LUXURY]120.00

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<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

  image001.jpg
4K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris B  
View profile  
 More options Oct 22 2012, 7:43 am
From: "Chris B" <chr...@datam.co.uk>
Date: Mon, 22 Oct 2012 12:43:12 +0100
Local: Mon, Oct 22 2012 7:43 am
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
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.

https://sites.google.com/site/intersystemsmv/home/a-cache-of-tips/wor...

You can access the entire library of tips at:

https://sites.google.com/site/intersystemsmv/home/a-cache-of-tips

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;

    Mayfair Hilton]01/11/12]TWIN ROOM\DOUBLE ROOM]80.00\75.00

    Cumberland]01/11/12]TWIN STANDARD]DELUXE]90.00\95.00

    Ambassador]01/11/12]LUXURY]120.00

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

  image001.jpg
4K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rich Taylor  
View profile  
 More options Oct 22 2012, 8:02 am
From: Rich Taylor <Rich.Tay...@intersystems.com>
Date: Mon, 22 Oct 2012 12:02:37 +0000
Local: Mon, Oct 22 2012 8:02 am
Subject: Re: [InterSystems-MV] Re: Advice on calling a Pick subroutine from a Zen Page

Chris,

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

Sent from my mobile device

  image001.jpg
4K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »