Re: Multi-Table Query Into JSON?

2018-03-22 Thread Keisuke Miyako via 4D_Tech
it’s not that the command has negative attributes, it’s more to do with the 
fact that the command is too basic. a similar example is ALERT. I know many 
applications use it in production, and there is nothing wrong about that, but 
fir me, it is primarily a development tool for quick testing, I would never use 
it in production.

Selection to JSON is not optimised for client server. there is a round trip for 
every record, unless you use it with the execute on server method property.

it does not support pagination. if you use in an export tool, you will not be 
able to cancel it or display progress, which is not ideal in production.

and as the original post pointed out, it does not support related tables. maybe 
you can embed it in a process 4D tags template in a way that the returned JSON 
becomes a sub object; just make sure the commas are printed at the right place.

I have worked with several customers who were having difficulties developing 
some new JSON features. they were trying to do it with Selection to JSON, and 
the solution in each case was to not insist on using that command.



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Multi-Table Query Into JSON?

2018-03-22 Thread Tim Nevels via 4D_Tech
On Mar 22, 2018, at 8:23 PM, Keisuke Miyako wrote:

> Selection to json is a very simple command with very specific usages.
> 
> it is nothing like selection to array.
> 
> put another way, it is not an important command, you don’t need to know it, 
> there is nothing you can’t do without it.
> 
> it is like a convenience command for quick testing when you want to stringify
> a selection.
> 
> in production, if you need to produce json from a selection, you should never 
> be using this command.

Why do you say this? Why is this command “bad” to use in a production 
environment? The documentation makes no reference to any restrictions on using 
this command.

As far as I’m concerned all 4D commands are just fine to use in “production” 
except for the TRACE and ABORT commands. 

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Multi-Table Query Into JSON?

2018-03-22 Thread Keisuke Miyako via 4D_Tech
it’s when you call it on a “template” object whose property values are pointers 
to fields.



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Multi-Table Query Into JSON?

2018-03-22 Thread Keisuke Miyako via 4D_Tech
Selection to json is a very simple command with very specific usages.

 it is nothing like selection to array.

put another way, it is not an important command, you don’t need to know it, 
there is nothing you can’t do without it.

it is like a convenience command for quick testing when you want to stringify
a selection.

in production, if you need to produce json from a selection, you should never 
be using this command.

if you are interested in getting an object array, you should not go through 
json, you should procedurally use OB commands (OB copy in template mode). you 
can combine it with apply to selection and the execute on server method 
property.







**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: When your Extreme router is too slow... (5N)

2018-03-22 Thread Guy Algot via 4D_Tech
Robert, Check out the Cisco RV routers. The RV042 has both OoS and VPN.

https://www.cisco.com/c/en/us/products/routers/small-business-rv-series-routers/models-comparison.html

> On Mar 22, 2018, at 6:03 PM, Robert ListMail via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Sam, 
> 
> I upgraded my home/office to Gigabit internet today and quickly discovered 
> that the WAN to LAN routing performance of my 5th generation Apple AirPort 
> Extreme is lacking in a big way. I can get as high as 941 Mbps downstream 
> directly connected to my SB-8200. When I go through AirPort Extreme router, 
> I’m getting 552 Mbps at best. Can you recommend a high-performance internet 
> router for the modern age? Also, the Apple router was always lacking in 
> features such as: no QOS and no VPN. So, I’m interested in more of a full 
> featured product. What router has the most street-cred?  :)   Just, kidding, 
> so, what router should I consider that you’ve been happy with where you’ve 
> had a WAN capable of Gigabit speeds?
> 
> Thanks,
> 
> Robert


Later,
Guy

--
Guy Algot, Solutions Specialist
Edmonton, Alberta
(780) 974-8538

hardware, installation, training, support, programming, internet
specializing in 4th Dimension
=-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Microsoft is a cross between the Borg and the Ferengi. Unfortunately,
they use Borg to do their marketing and Ferengi to do their programming."
-- Simon Slavin



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Write Pro setting print options

2018-03-22 Thread Keisuke Miyako via 4D_Tech
Hello,

WP PAGE SETUP over writes all current print settings with that of the write pro 
document, for the next print job. you should NOT use it when you are using 
regular SET PRINT OPTION to specify the paper and orientation.



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

When your Extreme router is too slow... (5N)

2018-03-22 Thread Robert ListMail via 4D_Tech
Sam, 

I upgraded my home/office to Gigabit internet today and quickly discovered that 
the WAN to LAN routing performance of my 5th generation Apple AirPort Extreme 
is lacking in a big way. I can get as high as 941 Mbps downstream directly 
connected to my SB-8200. When I go through AirPort Extreme router, I’m getting 
552 Mbps at best. Can you recommend a high-performance internet router for the 
modern age? Also, the Apple router was always lacking in features such as: no 
QOS and no VPN. So, I’m interested in more of a full featured product. What 
router has the most street-cred?  :)   Just, kidding, so, what router should I 
consider that you’ve been happy with where you’ve had a WAN capable of Gigabit 
speeds?

Thanks,

Robert

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Document Reference to Path

2018-03-22 Thread Chip Scheide via 4D_Tech
thanks -
I was really just trying to avoid passing yet another parameter to a 
method

On Thu, 22 Mar 2018 16:29:28 -0400, Charles Miller via 4D_Tech wrote:
> As was stated here is code
> array text($paths_atxt;0)
> 
> $Doc_Ref:=Open Document(“")
> 
> append to array ($paths_atxt;Document)
> 
> $Doc_Ref1:=Open Document(“")
> 
> append to array ($paths_atxt;Document)
> 
> You can of course use variables but usiong an array allows for unlimited
> paths
> 
> 
> Regards
> 
> 
> Chuck
> 
> 
> On Thu, Mar 22, 2018 at 3:15 PM, Chip Scheide via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Anyone have an idea on how to get a file path starting with a document
>> reference?
>> 
>> ex:
>> $Doc_Ref:=Open Document("")
>> $Doc_ref1:=Open Document("")
>> 
>> any ideas on getting the path to the file referenced by $Doc_Ref?
>> 
>> Thanks
>> Chip
>> ---
>> Gas is for washing parts
>> Alcohol is for drinkin'
>> Nitromethane is for racing
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> 
> 
> 
> -- 
> 
-
>  Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
>  Informed Solutions, Inc.
>  Brookline, MA 02446 USA Registered 4D Developer
>Providers of 4D, Sybase & SQL Server connectivity
>   http://www.informed-solutions.com
> 
-
> This message and any attached documents contain information which may be
> confidential, subject to privilege or exempt from disclosure under
> applicable law.  These materials are intended only for the use of the
> intended recipient. If you are not the intended recipient of this
> transmission, you are hereby notified that any distribution, disclosure,
> printing, copying, storage, modification or the taking of any action in
> reliance upon this transmission is strictly prohibited.  Delivery of this
> message to any person other than the intended recipient shall not
> compromise or waive such confidentiality, privilege or exemption
> from disclosure as to this communication.
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Document Reference to Path

2018-03-22 Thread Charles Miller via 4D_Tech
As was stated here is code
array text($paths_atxt;0)

$Doc_Ref:=Open Document(“")

append to array ($paths_atxt;Document)

$Doc_Ref1:=Open Document(“")

append to array ($paths_atxt;Document)

You can of course use variables but usiong an array allows for unlimited
paths


Regards


Chuck


On Thu, Mar 22, 2018 at 3:15 PM, Chip Scheide via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Anyone have an idea on how to get a file path starting with a document
> reference?
>
> ex:
> $Doc_Ref:=Open Document("")
> $Doc_ref1:=Open Document("")
>
> any ideas on getting the path to the file referenced by $Doc_Ref?
>
> Thanks
> Chip
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  http://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption
from disclosure as to this communication.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Write Pro setting print options

2018-03-22 Thread Jeremy French via 4D_Tech
Hi Pat,

Have you tried calling the command WP USE PAGE SETUP *after* INVOKE ACTION?

That is, the following call sequence works:

INVOKE ACTION
WP USE PAGE SETUP
WP PRINT

Also remember that the 4D Write Pro area must have the focus when INVOKE ACTION 
is called.

Best regards,
Jeremy

> On Mar 22, 2018, at 8:25 AM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> *INVOKE ACTION*("pageOrientation?value=landscape")
> 
> *INVOKE ACTION*("pageMode?value=page";ak current form)
> 
> and they don't have any effect.
> 

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Document Reference to Path

2018-03-22 Thread Dani Beaubien via 4D_Tech
I believe that the “Document” process variable will have the full path as long 
as the OK var is set to 1. You will need to get the contents of the variable 
after the 1st Open Document.

Dani

> On Mar 22, 2018, at 1:15 PM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Anyone have an idea on how to get a file path starting with a document 
> reference?
> 
> ex:
> $Doc_Ref:=Open Document("")
> $Doc_ref1:=Open Document("")
> 
> any ideas on getting the path to the file referenced by $Doc_Ref?
> 
> Thanks
> Chip
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Document Reference to Path

2018-03-22 Thread Chip Scheide via 4D_Tech
Anyone have an idea on how to get a file path starting with a document 
reference?

ex:
$Doc_Ref:=Open Document("")
$Doc_ref1:=Open Document("")

any ideas on getting the path to the file referenced by $Doc_Ref?

Thanks
Chip
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Multi-Table Query Into JSON?

2018-03-22 Thread Douglas von Roeder via 4D_Tech
Kelderic:

You're welcome.

The examples in the docs illustrate how the command can be used but, as
we've seen, they're *not* exhaustive. In this case, the functionality works
in V15 but never made it to the docs.

Over the years (decades) 4D has created it's own little "circle of life"
thing with developers.

4D add commands to the language and provides examples.

4D developers use those commands + examples until the command breaks and
then we complain about it.

4D responds "Why would you want to do that?" and tells us to file a bug
report.

4D reads the bug report, updates the ticket as "Can't reproduce", and
clicks the "Resolved" button. :-)



--
Douglas von Roeder
949-336-2902

On Thu, Mar 22, 2018 at 11:13 AM, Kelderic via 4D_Tech <4d_tech@lists.4d.com
> wrote:

> We are currently running on v15, not v16. The documentation for Selection
> to
> JSON for v15 doesn't have example two. I'll try running it and see if it
> works, or at least use this as a reason to push for updating 4D. Thanks,
> mate.
>
>
>
> --
> Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Test 4D Server using 4D Developer Professional license

2018-03-22 Thread Timothy Penner via 4D_Tech
Hi Chuck,

> That is one way, however, you can have two or more servers on on machine 
> which do not share license so you mnarry the lciense to the server.  You 
> could have prod 1 with 50 users and prod 2 with 15 users. When someone tries 
> to log into prod 2 (16th) even if there are only 20 connected to prod 1, the 
> connection will be refused

Using a built application with an OEM license yes; otherwise I don’t think 
there is any other way to "mnarry the lciense to the server". Without using a 
built-oem server the running applications will all share the same base license 
(assuming they are all running the same version, for example, 16.x).

Have you found a reliable way that works without using an OEM license?

-Tim



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Test 4D Server using 4D Developer Professional license

2018-03-22 Thread Charles Miller via 4D_Tech
That is one way, however, you can have two or more servers on on machine
which do not share license so you mnarry the lciense to the server.  You
could have prod 1 with 50 users and prod 2 with 15 users. When someone
tries to log into prod 2 (16th) even if there are only 20 connected to prod
1, the connection will be refused

Regards

Chuck

On Thu, Mar 22, 2018 at 12:20 PM, Tim Nevels via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> On Mar 22, 2018, at 11:02 AM, Chip Scheide wrote:
>
> > As long as you run on the same physical box (or in/on the same VM), you
> > should be able to run 2 or more copies of Server at the same time. You
> > will need to run each instance on a different set of ports.
> >
> > You are still limited to the to the same total number of concurrent
> > user licenses across all instances of Server.
> >
> > Example:
> > 1 - Mac Pro (why not)...
> >  1 - Production server
> >  1 - Test server
> >  1 - Dev server
> >
> > Available user licenses: 50
> > Prod server uses 40
> > Test server uses 5
> > Dev server uses 5
> > all is good, next user to log in to any server would get a 'not enough
> > licenses' warning.
> >
> > 4D support (Tim?) can correct me if I am wrong.
>
>
> That is how I understand it to work. Licenses are assigned to the physical
> machine 4D Server is running on, not the 4D Server application. The is why
> there is a single “Licenses” folder on the machine. Hence, license sharing
> among multiple 4D Server applications on the same machine is allowed and
> supported.
>
> I do it all the time when I need to put up a test version of a new
> structure at a client’s office. I run a second 4D Server application on
> their server machine and use a different set of ports. Then the testers
> have a special copy of 4D Client that has the different ports set and they
> use that to log into the test version.
>
> It used to be that the first 4D Server that was launched become the
> “license manger server”. Any additional 4D Server instances launched on the
> machine went through the first 4D Server application to get available
> license information. If you tried to quit 4D Server #1 and 4D Server #2 was
> still running you would get a message that you could not quit 4D Server #1
> until 4D Server #2 was no longer running. Have not seen that message in a
> long time, so not sure it still works that way.
>
> Tim
>
> Tim Nevels
> timnev...@mac.com 
> Innovative Solutions
> 785-749-3444
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  http://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption
from disclosure as to this communication.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: DOCUMENT TO BLOB stopped working

2018-03-22 Thread John Baughman via 4D_Tech
Turns out it’s the Label Editor document MyLabel.4lb.

Isolating the Document to blob…

C_BLOB($blob)
$vhDocRef:=Open document("")
If (ok=1)
CLOSE DOCUMENT($vhDocRef)
DOCUMENT TO BLOB(document;$blob)

end if

If I open MyLabel.4lb, I get zero octets. If I open a text document I get the 
document.

MyLabel.4lb was created using the Save button in the Label Editor.

Looks like a bug to me. Could someone test this on their end? I am using 4D v16 
R5 32bit on Mac OS 10.13.2.

Thanks,

John

> On Mar 22, 2018, at 12:28 AM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hello,
> 
> is the context relevant?
> 
> I mean, if you simply run DOCUMENT TO BLOB in a single line,
> in a new method, with the path hard coded, does it still not work?
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Multi-Table Query Into JSON?

2018-03-22 Thread Kelderic via 4D_Tech
I have a database with tables that are linked together via IDs. Simplified
example:

CallLogs Table
UniqueID, Date, Type, Log, CustomerID

Customers Table
UniqueID, FirstName, LastName, City, State

A CallLogs record will be linked to a Customers record by:

[CallLogs]CustomerID = [Customers]UniqueID



All of that is working. I have been using Selection to JSON to send data
from the DB out to a web app. However, the list of CallLogs doesn't have the
name of the linked Customer, because Selection to JSON only works with one
table.

I want to be able to return a joined set of data.

With SQL, I can do a JOIN request into an array of objects, and then convert
that array to JSON to send out. However, I can't figure out how to get a
joined set of data out of 4D. I can't even get multiple fields in ONE table,
into an object array.

Here is what I have tried:



ARRAY OBJECT(aoRecords;0)

Begin SQL
SELECT *
FROM CallLogs
INTO :aoRecords
End SQL



Is there a way to accomplish this besides querying and then looping through
and building the arrays myself? Thanks!




--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Test 4D Server using 4D Developer Professional license

2018-03-22 Thread Chip Scheide via 4D_Tech
AS I understood Jim's question
he did not want to do testing/make changes to a production server.

I was just giving him a workaround(?) a solution(?) to not having a 2 
user server license

Chip
On Thu, 22 Mar 2018 16:26:34 +, Timothy Penner via 4D_Tech wrote:
> yes it works that way - but I don't think this information pertains 
> to Jim's question.
> 
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Test 4D Server using 4D Developer Professional license

2018-03-22 Thread Timothy Penner via 4D_Tech
Regarding access to 4D Server using the 4D Developer Pro license, I think that 
Doug von Roeder hit the nail on the head:

> 4D Developer Pro  doesn't 
> include a server,
> 4D Team Developer Professional 
>  does.

See also:
http://www.4d.com/products/4dv16/development.html

Regarding running multiple 4D Server applications on a single machine with a 
single 4D Server license being shared (what chip posted), yes it works that way 
- but I don't think this information pertains to Jim's question.

-Tim



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Test 4D Server using 4D Developer Professional license

2018-03-22 Thread Tim Nevels via 4D_Tech
On Mar 22, 2018, at 11:02 AM, Chip Scheide wrote:

> As long as you run on the same physical box (or in/on the same VM), you 
> should be able to run 2 or more copies of Server at the same time. You 
> will need to run each instance on a different set of ports.
> 
> You are still limited to the to the same total number of concurrent 
> user licenses across all instances of Server.
> 
> Example:
> 1 - Mac Pro (why not)... 
>  1 - Production server
>  1 - Test server
>  1 - Dev server
> 
> Available user licenses: 50
> Prod server uses 40
> Test server uses 5
> Dev server uses 5
> all is good, next user to log in to any server would get a 'not enough 
> licenses' warning.
> 
> 4D support (Tim?) can correct me if I am wrong.


That is how I understand it to work. Licenses are assigned to the physical 
machine 4D Server is running on, not the 4D Server application. The is why 
there is a single “Licenses” folder on the machine. Hence, license sharing 
among multiple 4D Server applications on the same machine is allowed and 
supported. 

I do it all the time when I need to put up a test version of a new structure at 
a client’s office. I run a second 4D Server application on their server machine 
and use a different set of ports. Then the testers have a special copy of 4D 
Client that has the different ports set and they use that to log into the test 
version. 

It used to be that the first 4D Server that was launched become the “license 
manger server”. Any additional 4D Server instances launched on the machine went 
through the first 4D Server application to get available license information. 
If you tried to quit 4D Server #1 and 4D Server #2 was still running you would 
get a message that you could not quit 4D Server #1 until 4D Server #2 was no 
longer running. Have not seen that message in a long time, so not sure it still 
works that way. 

Tim

Tim Nevels 
timnev...@mac.com 
Innovative Solutions
785-749-3444


**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Write Pro setting print options

2018-03-22 Thread Pat Bensky via 4D_Tech
Nope ... as you pointed out, it's not a printing issue. It's a "saving the
specified settings" issue. INVOKE ACTION isn't used at all in that HDI
example.

On 22 March 2018 at 15:02, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> perhaps the HDI demos might help:
>
> http://download.4d.com/Demos/4D_v16/
>
> HDI_4DWP_Print.zip
>
> > 2018/03/22 13:25、Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> のメール:
> > Is there something additional I need to do?
>
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Test 4D Server using 4D Developer Professional license

2018-03-22 Thread Douglas von Roeder via 4D_Tech
4D Developer Pro  doesn't
include a server, 4D Team Developer Professional
 does.

--
Douglas von Roeder
949-336-2902

On Thu, Mar 22, 2018 at 9:01 AM, Chip Scheide via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Jim,
> As long as you run on the same physical box (or in/on the same VM), you
> should be able to run 2 or more copies of Server at the same time. You
> will need to run each instance on a different set of ports.
>
> You are still limited to the to the same total number of concurrent
> user licenses across all instances of Server.
>
> Example:
> 1 - Mac Pro (why not)...
>   1 - Production server
>   1 - Test server
>   1 - Dev server
>
> Available user licenses: 50
> Prod server uses 40
> Test server uses 5
> Dev server uses 5
> all is good, next user to log in to any server would get a 'not enough
> licenses' warning.
>
> 4D support (Tim?) can correct me if I am wrong.
>
> Chip
>
> On Thu, 22 Mar 2018 10:00:33 -0400, Jim Crate via 4D_Tech wrote:
> > I thought 4D Developer Professional included a 2-user 4D Server
> > license so we could test using 4D Server without having to run a
> > separate instance on the production server. However, when I launch 4D
> > Server, it asks for activation. It appears to accept my 4D Developer
> > Professional license but then does not open a structure. If I
> > relaunch 4D Server it asks to be activated again. Will Server no
> > longer run on a developer license? If so, this should be
> > reconsidered. I’d really prefer not to have to debug On Server
> > Shutdown on the production server.
> >
> > 4D 16.3 on macOS 10.13.
> >
> > Jim Crate
> >
> > **
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> > **
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Test 4D Server using 4D Developer Professional license

2018-03-22 Thread Chip Scheide via 4D_Tech
Jim,
As long as you run on the same physical box (or in/on the same VM), you 
should be able to run 2 or more copies of Server at the same time. You 
will need to run each instance on a different set of ports.

You are still limited to the to the same total number of concurrent 
user licenses across all instances of Server.

Example:
1 - Mac Pro (why not)... 
  1 - Production server
  1 - Test server
  1 - Dev server

Available user licenses: 50
Prod server uses 40
Test server uses 5
Dev server uses 5
all is good, next user to log in to any server would get a 'not enough 
licenses' warning.

4D support (Tim?) can correct me if I am wrong.

Chip
 
On Thu, 22 Mar 2018 10:00:33 -0400, Jim Crate via 4D_Tech wrote:
> I thought 4D Developer Professional included a 2-user 4D Server 
> license so we could test using 4D Server without having to run a 
> separate instance on the production server. However, when I launch 4D 
> Server, it asks for activation. It appears to accept my 4D Developer 
> Professional license but then does not open a structure. If I 
> relaunch 4D Server it asks to be activated again. Will Server no 
> longer run on a developer license? If so, this should be 
> reconsidered. I’d really prefer not to have to debug On Server 
> Shutdown on the production server.
> 
> 4D 16.3 on macOS 10.13.
> 
> Jim Crate
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Test 4D Server using 4D Developer Professional license

2018-03-22 Thread Koen Van Hooreweghe via 4D_Tech
Hi Jim,

4D sales people should correct me if I’m wrong. But AFAIK a 4D Develop license 
does not include a 4D Server license. If you have a partner contract (Silver, 
Gold), you will get a 4D Developer license as well as a separate 2-user 4D 
Server license for testing purposes.

Kind regards,
Koen

> Op 22 mrt. 2018, om 15:00 heeft Jim Crate via 4D_Tech <4d_tech@lists.4d.com> 
> het volgende geschreven:
> 
> I thought 4D Developer Professional included a 2-user 4D Server license so we 
> could test using 4D Server without having to run a separate instance on the 
> production server. However, when I launch 4D Server, it asks for activation. 
> It appears to accept my 4D Developer Professional license but then does not 
> open a structure. If I relaunch 4D Server it asks to be activated again. Will 
> Server no longer run on a developer license? If so, this should be 
> reconsidered. I’d really prefer not to have to debug On Server Shutdown on 
> the production server.
> 
> 4D 16.3 on macOS 10.13.





Compass bvba
Koen Van Hooreweghe
Kloosterstraat 65
9910 Knesselare
Belgium
tel +32 495 511.653

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Test 4D Server using 4D Developer Professional license

2018-03-22 Thread Jim Crate via 4D_Tech
I thought 4D Developer Professional included a 2-user 4D Server license so we 
could test using 4D Server without having to run a separate instance on the 
production server. However, when I launch 4D Server, it asks for activation. It 
appears to accept my 4D Developer Professional license but then does not open a 
structure. If I relaunch 4D Server it asks to be activated again. Will Server 
no longer run on a developer license? If so, this should be reconsidered. I’d 
really prefer not to have to debug On Server Shutdown on the production server.

4D 16.3 on macOS 10.13.

Jim Crate

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Write Pro setting print options

2018-03-22 Thread Pat Bensky via 4D_Tech
Thanks - there are so many places to look for commands that affect WritePro
areas, I sometimes forget about that one :)

is your question about the checkmark missing in the contextual popup menu?
Yes, that is one part of the question.

Unfortunately this still doesn't work.
I am creating documents entirely in code. A template document is opened and
modified. Once the doc has been created it is printed as a PDF and also
saved in a new record in the database.

None of the "invoke action" options seem to stick. The document size and
other settings such as page orientation are always the same as the WritePro
template that was used as the basis for the new document.

I tried adding some additional actions - e.g.:

*INVOKE ACTION*("pageOrientation?value=landscape")

*INVOKE ACTION*("pageMode?value=page";ak current form)

and they don't have any effect.

Is there something additional I need to do?

Thanks!

Pat

On 22 March 2018 at 10:27, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Hello,
>
> the commands
>
> is your question about the checkmark missing in the contextual popup menu?
>
>
> SET PRINT OPTION is a printing command,
> to change the document size of the Write Pro doc itself,
> I think you need to INVOKE ACTION
>
> http://doc.4d.com/4Dv16R5/4D/16-R5/Using-4D-Write-Pro-
> standard-actions.200-3494557.en.html
>
> e.g.
>
> INVOKE ACTION("pageSize?index=1";ak current form)
>
> > 2018/03/21 19:30、Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> のメール:
> >
> > I use
> >
> > SET PRINT OPTION(Paper option;"A4")
> >
> > to set the page size to A4.
> >
> > But this doesn't seem to work.
> > If I view the document that was created, go to
> > Document->Page size
> >
> > No page size is selected.
> > I choose A4 and the page size changes accordingly.
> >
> > BTW if I go again to Document->Page size, it still doesn't show which
> page
> > size is selected.
> >
> > Likewise, SET PRINT OPTION(Orientation option;2) doesn't seem to have any
> > effect.
> >
> > Am I doing this the wrong way?
> >
>
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: DOCUMENT TO BLOB stopped working

2018-03-22 Thread Keisuke Miyako via 4D_Tech
Hello,

is the context relevant?

I mean, if you simply run DOCUMENT TO BLOB in a single line,
in a new method, with the path hard coded, does it still not work?



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Write Pro setting print options

2018-03-22 Thread Keisuke Miyako via 4D_Tech
Hello,

the commands

is your question about the checkmark missing in the contextual popup menu?


SET PRINT OPTION is a printing command,
to change the document size of the Write Pro doc itself,
I think you need to INVOKE ACTION

http://doc.4d.com/4Dv16R5/4D/16-R5/Using-4D-Write-Pro-standard-actions.200-3494557.en.html

e.g.

INVOKE ACTION("pageSize?index=1";ak current form)

> 2018/03/21 19:30、Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> のメール:
>
> I use
>
> SET PRINT OPTION(Paper option;"A4")
>
> to set the page size to A4.
>
> But this doesn't seem to work.
> If I view the document that was created, go to
> Document->Page size
>
> No page size is selected.
> I choose A4 and the page size changes accordingly.
>
> BTW if I go again to Document->Page size, it still doesn't show which page
> size is selected.
>
> Likewise, SET PRINT OPTION(Orientation option;2) doesn't seem to have any
> effect.
>
> Am I doing this the wrong way?
>




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: DOCUMENT TO BLOB stopped working

2018-03-22 Thread John Baughman via 4D_Tech
Let me correct something. My original code did not have the Open Document line. 
I put in in just to match the documentation while I was debugging. I should 
have look like this…

ARRAY TEXT($aSelected;0)
$document:=Select document("";"*";"Select the label document that was saved to 
disk...";0;$aSelected)
…. a bunch of code…….
C_BLOB($blob)   

DOCUMENT TO BLOB($aSelected{1};$blob)  // $blob = 0 octets ***
If (ok=1)
[_LabelDocument]Document:=$blob
….more code….



> On Mar 22, 2018, at 12:08 AM, John Baughman via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I wrote this in 2009 and it has worked for many years. I am not sure exactly 
> when it broke, but I think within the last year. The following code loads a 
> saved Label Editor document to the database.
> 
> ARRAY TEXT($aSelected;0)
> $document:=Select document("";"*";"Select the label document that was saved 
> to disk...";0;$aSelected)
>   //I am using Select document because Open Document does not have a 
> message field.
> $vhDocRef:=Open document($aSelected{1})  // Select the document of your choice
> If (ok=1)
>CLOSE DOCUMENT($vhDocRef)  // We don't need to keep it
>…. a bunch of code…….
>C_BLOB($blob)  
> 
>DOCUMENT TO BLOB(Document;$blob)  //$blob = 0 octets
>If (ok=1)
>  [_LabelDocument]Document:=$blob
>  ….more code….
> 
> Document and aSelected{1} properly contain the full path to the Label Editor 
> document…
> 
>   Macintosh HD:Users:johnbdh2:Desktop:My Label.4lb 
> 
> Is  this a bug, or am I missing something.
> 
> Thanks,
> 
> John
> 
> 
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> john...@hawaii.rr.com
> 
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

DOCUMENT TO BLOB stopped working

2018-03-22 Thread John Baughman via 4D_Tech
I wrote this in 2009 and it has worked for many years. I am not sure exactly 
when it broke, but I think within the last year. The following code loads a 
saved Label Editor document to the database.

ARRAY TEXT($aSelected;0)
$document:=Select document("";"*";"Select the label document that was saved to 
disk...";0;$aSelected)
//I am using Select document because Open Document does not have a 
message field.
$vhDocRef:=Open document($aSelected{1})  // Select the document of your choice
If (ok=1)
CLOSE DOCUMENT($vhDocRef)  // We don't need to keep it
…. a bunch of code…….
C_BLOB($blob)   

DOCUMENT TO BLOB(Document;$blob)  //$blob = 0 octets
If (ok=1)
  [_LabelDocument]Document:=$blob
  ….more code….

Document and aSelected{1} properly contain the full path to the Label Editor 
document…

Macintosh HD:Users:johnbdh2:Desktop:My Label.4lb 

Is  this a bug, or am I missing something.

Thanks,

John


John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Collections

2018-03-22 Thread Peter Bozek via 4D_Tech
On Thu, Mar 22, 2018 at 1:16 AM, John DeSoi via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> In the 4D case and in the cases below (plus PHP), I suspect a collection
> is really just an "object" (hash table) with numeric keys instead of string
> keys. For example, if I write
>
> $collection := New collection()
> $collection[247] := "fred"
>
> I doubt that it creates 247 (indexes 0-246) empty elements in the
> collection. Would love to hear confirmation or denial from some one at 4D
> that knows the internals.
>
>
In fact, Collection has some object-like properties. It can be  passed to
method as parameters and return values, it is - like object - manipulated
by reference, and the content is not typed (it means collection[3] can be a
number, and few lines later it can be a string, jsut like a.b .)

--

Peter Bozek
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Collections

2018-03-22 Thread Keisuke Miyako via 4D_Tech
http://doc.4d.com/4Dv16R4/4D/16-R4/New-collection.301-3342875.en.html

> Optionally, you can prefill the new collection by passing one or several 
> value(s) as parameter(s).
> Otherwise, you can add or modify elements subsequently through object 
> notation assignment. For example:
>
>  myCol[10]:="My new element"
>
> If the new element index is beyond the last existing element of the 
> collection, the collection is automatically resized and all new intermediary 
> elements get the null value.




**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**