RE: 4D v15 and Microsoft PDF

2018-10-02 Thread Timothy Penner via 4D_Tech
Hi Bob,

I am guessing the reason for the failure is that you are trying to write to the 
root of the C:\ drive which is usually "write protected"; so that's probably 
not going to work.

Also, you don’t seem to be specifying a filename but just a path instead...

In this tech tip we use the desktop, please try something similar:

Tech Tip: PDF creation on Windows 10 (without PDF Creator)
http://kb.4d.com/assetid=77378

$pdfpath:=System folder(Desktop)+"test.pdf"
 $pdfprintername:="Microsoft Print to PDF"
ARRAY TEXT($name1;0)
PRINTERS LIST($name1)
If(Find in array($name1;$pdfprintername)>0)
  SET CURRENT PRINTER($pdfprintername)
  SET PRINT OPTION(Destination option;2;$pdfpath)
  ALL RECORDS([Table_1])
  PRINT SELECTION([Table_1];*)
  SET CURRENT PRINTER(“”)
End if


Hope that helps.

-Tim



**
4D Internet Users Group (4D iNUG)
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 v15 and Microsoft PDF

2018-10-02 Thread Robert McKeever via 4D_Tech
Trying to make a PDF under Windows 10 as PDFCreator does not work on the 
client’s machine.

The following code does not work (unable to start print job):

$PDFPath:="C:\\"
$PDFPrinter:="Microsoft Print to PDF"
ARRAY TEXT($Name1;0)
PRINTERS LIST($Name1)
If (Find in array($Name1;$PDFPrinter)>0)
SET CURRENT PRINTER($PDFPrinter)
SET PRINT OPTION(Destination option;2;$PDFPath)
`set print option(Spooler document name option;"HumptyDumpty")
ALL RECORDS([Table_1])
FORM SET OUTPUT([Table_1];"List")
PRINT SELECTION([Table_1];*)
SET CURRENT PRINTER("")
End if

Yet, I went to print the procedure above under Windows 10, and the "Microsoft 
Print to PDF” was offered as a selectable printer, so I choose it, and it 
printed a nice PDF. 

I need the above code to work under 4D V15.4. I use the SET PRINT 
OPTION(Destination option;3;$PDFPath) on the Mac and it runs fine. 

What do I need to change?
_
Bob McKeever  http://www.mswl.com 
McKeever's Software Wizardry
Port Coquitlam, B.C.
bobmckee...@mac.com




**
4D Internet Users Group (4D iNUG)
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: v13 - Relate One Selection issue

2018-10-02 Thread Chip Scheide via 4D_Tech
Thanks  Tim,

it appears to have been one or more damaged indices

Cihp

On Tue, 02 Oct 2018 16:00:36 -0500, Tim Nevels via 4D_Tech wrote:
> On Oct 2, 2018, at 2:00 PM, Chip Scheide wrote:
> 
>> given this table configuration
>> 
>> Animal <-- Animal_Sample_Link ---> Samples
>> 
>> if there is at least 1 [Sample_Animal_Link] record shouldn't the 
>> following code load the animal record(s)?
>> 
>> 
QUERY([Sample_Animal_Link];[Sample_Animal_Link]Sample_ID=[Samples]Sample_ID)
>> RELATE ONE SELECTION([Sample_Animal_Link];[Animal])
>> 
>> I ask because it is not, even after a restart of 4D
> 
> Four thoughts came to mind:
> 
> 1. index damage so the query or relation is failing
> 
> 2. Could there be other relations that 4D could go through to get 
> from Sample_Animal_Link to Animal? Maybe 4D picked another set of 
> relations to follow to get from here to there. Result is wrong 
> selection of records.
> 
> 3. Are you running this code from a button or a menu item while a 
> MODIFY SELECTION or DISPLAY SELECTION is running? Sometimes 4D will 
> not do certain relational things because it can “break” the MODIFY 
> SELECTION or DISPLAY SELECTION if any of the tables in question are 
> involved.
> 
> 4. If you do a  QUERY or QUERY WITH ARRAY instead of a RELATE ONE 
> SELECTION, do you get the expected selection of records? If so then 
> see #2 or #3 above. 
> 
> Tim
> 
> *
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> timnev...@mac.com
> *
> 
> **
> 4D Internet Users Group (4D iNUG)
> 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)
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: can an array be added to a Form's object list i.e. Form.Array?

2018-10-02 Thread Kirk Brooks via 4D_Tech
Keith,
I agree with you about using Form in lieu of process vars. As a rule I like
to keep 'the data' separate from 'all the other stuff' to make it easier to
debug the data and to be able to encapsulate the various methods used to
create those other things.

thinking about I could see a rule of thumb for passing both a data object
and various setup and choice options to a form to be as simple as:
{"data":{... }, "options": {... }}

This way I can easily manage the two aspects. Plus it would make it easier
to setup form options in a consistent way. Hmm, I hadn't thought about that
before. So a method to display a data object (which could be an entity too)
might look like:

$obj:=New object("data";$1;"options";new object)

Get_some_inputOptions($obj.options)

Get_some_choiceLists($obj.options)

Get_some_formatStuff($obj.options)

Dialog("myForm";$obj)


Where each of the 'Get_some_@' methods assembles its material and writes it
to the object. These would be very easy to test and reuse too.




On Tue, Oct 2, 2018 at 2:47 PM Keith Culotta via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I'm new enough with collections and entities not to have a good sense of
> what techniques are most efficient.  I have been thinking of Form as a
> communication vehicle to be loaded and unloaded, and a way to avoid process
> variables.
> Arrays would need to be packed and unpacked, but Example 11 on page
> http://doc.4d.com/4Dv17/4D/17/OB-SET.301-3730704.en.html makes me want to
> try using Form.CollectionName[n] too.
>
> Keith
>
> > On Oct 2, 2018, at 4:03 PM, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > Keith,
> > Sure, if having the choice list in the data object is relevant. Depends
> on
> > how the form is set up I think. Typically I would pass a data object to a
> > form or subform to be populated with data or allow the user to edit it. I
> > make the form for a particular kind of operation. Right now I'm working
> on
> > Payments so I've got a main Payment form and a few subforms that manage
> > some aspect of a payment. Like credit card entry, manual entry, static
> > display and so on. So things like popups or combo boxes are static or
> > dynamic within a range and the content is determined by the kind of form.
> > All I care about getting into the data object is whatever choice is made.
> >
> > It sounds like you're describing a situation where the data object
> includes
> > things like the choice lists.
> >
> > It's not a case of one being better than the other, more a case of
> > different approaches to managing the form.
> >
> > On Tue, Oct 2, 2018 at 1:28 PM Keith Culotta via 4D_Tech <
> > 4d_tech@lists.4d.com> wrote:
> >
> >> or for each value of ChoicesArray: OB
> SET(Form;"ChoicesArray"+string($i);
> >> ChoicesArray{$i}) ?
> >>
> >> Keith
> >>
> >>> On Oct 2, 2018, at 3:10 PM, Keith Culotta via 4D_Tech <
> >> 4d_tech@lists.4d.com> wrote:
> >>>
> >>> You can save ChoicesArray to the Form object with OB SET
> >> ARRAY(Form;"myarr";ChoicesArray).
> >>> http://doc.4d.com/4Dv17/4D/17/OB-SET-ARRAY.301-3730702.en.html
> >>>
> >>> Also 'JSON Stringify array' will produce a string that can be
> >> reconstituted with JSON PARSE ARRAY.
> >>> FORM.myarr:=$stringifiedArray
> >>> http://doc.4d.com/4Dv17/4D/17/JSON-PARSE-ARRAY.301-3730390.en.html
> >>>
> >>> Keith - CDI
> >>>
>  On Oct 2, 2018, at 2:42 PM, Chris Belanger via 4D_Tech <
> >> 4d_tech@lists.4d.com> wrote:
> 
>  I am trying to make a ComboBox object that is local to the Form. Hence
> >> I need the Array to be a Form. object
> 
>  ARRAY TEXT(Form.ChoicesArray;0) does not work;
> 
>  Trying to get the data into a COLLECTION and then use COLLECTION TO
> >> ARRAY (which should define the array easily) does not work:
> 
>  Form.col_UnitTypes:=ds.Unit_Type.all().orderBy("Name
> >> asc").toCollection("Name";dk with primary key)
>  COLLECTION TO ARRAY(Form.col_UnitTypes;Form.box_Type_Unit;"Name")
> >>
> 
>  does not work ("4D was expecting a Variable" error).
> 
> 
>  Is there now way to set up an ARRAY for Form.Array usage?
> 
>  Thanks for any observations,
> 
>  Chris
> 
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
Kirk Brooks
San Francisco, CA
===

*We go vote - they go home*
**
4D Internet Users Group (4D iNUG)
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: can an array be added to a Form's object list i.e. Form.Array?

2018-10-02 Thread Keith Culotta via 4D_Tech
I'm new enough with collections and entities not to have a good sense of what 
techniques are most efficient.  I have been thinking of Form as a communication 
vehicle to be loaded and unloaded, and a way to avoid process variables.
Arrays would need to be packed and unpacked, but Example 11 on page 
http://doc.4d.com/4Dv17/4D/17/OB-SET.301-3730704.en.html makes me want to try 
using Form.CollectionName[n] too.

Keith 

> On Oct 2, 2018, at 4:03 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Keith,
> Sure, if having the choice list in the data object is relevant. Depends on
> how the form is set up I think. Typically I would pass a data object to a
> form or subform to be populated with data or allow the user to edit it. I
> make the form for a particular kind of operation. Right now I'm working on
> Payments so I've got a main Payment form and a few subforms that manage
> some aspect of a payment. Like credit card entry, manual entry, static
> display and so on. So things like popups or combo boxes are static or
> dynamic within a range and the content is determined by the kind of form.
> All I care about getting into the data object is whatever choice is made.
> 
> It sounds like you're describing a situation where the data object includes
> things like the choice lists.
> 
> It's not a case of one being better than the other, more a case of
> different approaches to managing the form.
> 
> On Tue, Oct 2, 2018 at 1:28 PM Keith Culotta via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> or for each value of ChoicesArray: OB SET(Form;"ChoicesArray"+string($i);
>> ChoicesArray{$i}) ?
>> 
>> Keith
>> 
>>> On Oct 2, 2018, at 3:10 PM, Keith Culotta via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>>> 
>>> You can save ChoicesArray to the Form object with OB SET
>> ARRAY(Form;"myarr";ChoicesArray).
>>> http://doc.4d.com/4Dv17/4D/17/OB-SET-ARRAY.301-3730702.en.html
>>> 
>>> Also 'JSON Stringify array' will produce a string that can be
>> reconstituted with JSON PARSE ARRAY.
>>> FORM.myarr:=$stringifiedArray
>>> http://doc.4d.com/4Dv17/4D/17/JSON-PARSE-ARRAY.301-3730390.en.html
>>> 
>>> Keith - CDI
>>> 
 On Oct 2, 2018, at 2:42 PM, Chris Belanger via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
 
 I am trying to make a ComboBox object that is local to the Form. Hence
>> I need the Array to be a Form. object
 
 ARRAY TEXT(Form.ChoicesArray;0) does not work;
 
 Trying to get the data into a COLLECTION and then use COLLECTION TO
>> ARRAY (which should define the array easily) does not work:
 
 Form.col_UnitTypes:=ds.Unit_Type.all().orderBy("Name
>> asc").toCollection("Name";dk with primary key)
 COLLECTION TO ARRAY(Form.col_UnitTypes;Form.box_Type_Unit;"Name")
>> 
 
 does not work ("4D was expecting a Variable" error).
 
 
 Is there now way to set up an ARRAY for Form.Array usage?
 
 Thanks for any observations,
 
 Chris
 

**
4D Internet Users Group (4D iNUG)
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: can an array be added to a Form's object list i.e. Form.Array?

2018-10-02 Thread Kirk Brooks via 4D_Tech
Keith,
Sure, if having the choice list in the data object is relevant. Depends on
how the form is set up I think. Typically I would pass a data object to a
form or subform to be populated with data or allow the user to edit it. I
make the form for a particular kind of operation. Right now I'm working on
Payments so I've got a main Payment form and a few subforms that manage
some aspect of a payment. Like credit card entry, manual entry, static
display and so on. So things like popups or combo boxes are static or
dynamic within a range and the content is determined by the kind of form.
All I care about getting into the data object is whatever choice is made.

It sounds like you're describing a situation where the data object includes
things like the choice lists.

It's not a case of one being better than the other, more a case of
different approaches to managing the form.

On Tue, Oct 2, 2018 at 1:28 PM Keith Culotta via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> or for each value of ChoicesArray: OB SET(Form;"ChoicesArray"+string($i);
> ChoicesArray{$i}) ?
>
> Keith
>
> > On Oct 2, 2018, at 3:10 PM, Keith Culotta via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > You can save ChoicesArray to the Form object with OB SET
> ARRAY(Form;"myarr";ChoicesArray).
> > http://doc.4d.com/4Dv17/4D/17/OB-SET-ARRAY.301-3730702.en.html
> >
> > Also 'JSON Stringify array' will produce a string that can be
> reconstituted with JSON PARSE ARRAY.
> >  FORM.myarr:=$stringifiedArray
> > http://doc.4d.com/4Dv17/4D/17/JSON-PARSE-ARRAY.301-3730390.en.html
> >
> > Keith - CDI
> >
> >> On Oct 2, 2018, at 2:42 PM, Chris Belanger via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >>
> >> I am trying to make a ComboBox object that is local to the Form. Hence
> I need the Array to be a Form. object
> >>
> >> ARRAY TEXT(Form.ChoicesArray;0) does not work;
> >>
> >> Trying to get the data into a COLLECTION and then use COLLECTION TO
> ARRAY (which should define the array easily) does not work:
> >>
> >> Form.col_UnitTypes:=ds.Unit_Type.all().orderBy("Name
> asc").toCollection("Name";dk with primary key)
> >> COLLECTION TO ARRAY(Form.col_UnitTypes;Form.box_Type_Unit;"Name")
>
> >>
> >> does not work ("4D was expecting a Variable" error).
> >>
> >>
> >> Is there now way to set up an ARRAY for Form.Array usage?
> >>
> >> Thanks for any observations,
> >>
> >> Chris
> >>
> >>
> >> **
> >> 4D Internet Users Group (4D iNUG)
> >> 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)
> > 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)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
Kirk Brooks
San Francisco, CA
===

*We go vote - they go home*
**
4D Internet Users Group (4D iNUG)
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: v13 - Relate One Selection issue

2018-10-02 Thread Tim Nevels via 4D_Tech
On Oct 2, 2018, at 2:00 PM, Chip Scheide wrote:

> given this table configuration
> 
> Animal <-- Animal_Sample_Link ---> Samples
> 
> if there is at least 1 [Sample_Animal_Link] record shouldn't the 
> following code load the animal record(s)?
> 
> QUERY([Sample_Animal_Link];[Sample_Animal_Link]Sample_ID=[Samples]Sample_ID)
> RELATE ONE SELECTION([Sample_Animal_Link];[Animal])
> 
> I ask because it is not, even after a restart of 4D

Four thoughts came to mind:

1. index damage so the query or relation is failing

2. Could there be other relations that 4D could go through to get from 
Sample_Animal_Link to Animal? Maybe 4D picked another set of relations to 
follow to get from here to there. Result is wrong selection of records.

3. Are you running this code from a button or a menu item while a MODIFY 
SELECTION or DISPLAY SELECTION is running? Sometimes 4D will not do certain 
relational things because it can “break” the MODIFY SELECTION or DISPLAY 
SELECTION if any of the tables in question are involved.

4. If you do a  QUERY or QUERY WITH ARRAY instead of a RELATE ONE SELECTION, do 
you get the expected selection of records? If so then see #2 or #3 above. 

Tim

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

**
4D Internet Users Group (4D iNUG)
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: can an array be added to a Form's object list i.e. Form.Array?

2018-10-02 Thread Keith Culotta via 4D_Tech
or for each value of ChoicesArray: OB SET(Form;"ChoicesArray"+string($i); 
ChoicesArray{$i}) ?

Keith 

> On Oct 2, 2018, at 3:10 PM, Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> You can save ChoicesArray to the Form object with OB SET 
> ARRAY(Form;"myarr";ChoicesArray).
> http://doc.4d.com/4Dv17/4D/17/OB-SET-ARRAY.301-3730702.en.html
> 
> Also 'JSON Stringify array' will produce a string that can be reconstituted 
> with JSON PARSE ARRAY.
>  FORM.myarr:=$stringifiedArray
> http://doc.4d.com/4Dv17/4D/17/JSON-PARSE-ARRAY.301-3730390.en.html
> 
> Keith - CDI
> 
>> On Oct 2, 2018, at 2:42 PM, Chris Belanger via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> I am trying to make a ComboBox object that is local to the Form. Hence I 
>> need the Array to be a Form. object
>> 
>> ARRAY TEXT(Form.ChoicesArray;0) does not work;
>> 
>> Trying to get the data into a COLLECTION and then use COLLECTION TO ARRAY 
>> (which should define the array easily) does not work:
>> 
>> Form.col_UnitTypes:=ds.Unit_Type.all().orderBy("Name 
>> asc").toCollection("Name";dk with primary key)  
>> COLLECTION TO ARRAY(Form.col_UnitTypes;Form.box_Type_Unit;"Name")
>> 
>> does not work ("4D was expecting a Variable" error).
>> 
>> 
>> Is there now way to set up an ARRAY for Form.Array usage?
>> 
>> Thanks for any observations,
>> 
>> Chris
>> 
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> 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)
> 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)
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: can an array be added to a Form's object list i.e. Form.Array?

2018-10-02 Thread Kirk Brooks via 4D_Tech
Chris,
As you found arrays are not supported for use with Form. Objects like a
combo box are aren't that hard to do but until they support a collection as
the data source you have to manage them in classic 4D fashion. Which means
you can shuffle an array around using OB SET/GET ARRAY and some containing
object. You don't get the nifty feature of the combo box updating the
values in Form, of course.

If the combo list is static you can put those values in a hard coded list
or simply list them in the combo object. If they are dynamically built On
Load you can just assign the array to the combo object. If the list is
built before the form is displayed then you could put it in the data object
passed to the form when it's opened and becomes Form.

I like to have the combo box code fire on Data Change and at that point
write the relevant value (Self->{0}) to my data object in Form.

On Tue, Oct 2, 2018 at 12:42 PM Chris Belanger via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I am trying to make a ComboBox object that is local to the Form. Hence I
> need the Array to be a Form. object
>
> ARRAY TEXT(Form.ChoicesArray;0) does not work;
>
> Trying to get the data into a COLLECTION and then use COLLECTION TO ARRAY
> (which should define the array easily) does not work:
>
> Form.col_UnitTypes:=ds.Unit_Type.all().orderBy("Name
> asc").toCollection("Name";dk with primary key)
> COLLECTION TO ARRAY(Form.col_UnitTypes;Form.box_Type_Unit;"Name")
>
>
> does not work ("4D was expecting a Variable" error).
>
>
> Is there now way to set up an ARRAY for Form.Array usage?
>
> Thanks for any observations,
>
> Chris
>
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
Kirk Brooks
San Francisco, CA
===

*We go vote - they go home*
**
4D Internet Users Group (4D iNUG)
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: can an array be added to a Form's object list i.e. Form.Array?

2018-10-02 Thread Keith Culotta via 4D_Tech
You can save ChoicesArray to the Form object with OB SET 
ARRAY(Form;"myarr";ChoicesArray).
http://doc.4d.com/4Dv17/4D/17/OB-SET-ARRAY.301-3730702.en.html

Also 'JSON Stringify array' will produce a string that can be reconstituted 
with JSON PARSE ARRAY.
  FORM.myarr:=$stringifiedArray
http://doc.4d.com/4Dv17/4D/17/JSON-PARSE-ARRAY.301-3730390.en.html

Keith - CDI

> On Oct 2, 2018, at 2:42 PM, Chris Belanger via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am trying to make a ComboBox object that is local to the Form. Hence I need 
> the Array to be a Form. object
> 
> ARRAY TEXT(Form.ChoicesArray;0) does not work;
> 
> Trying to get the data into a COLLECTION and then use COLLECTION TO ARRAY 
> (which should define the array easily) does not work:
> 
> Form.col_UnitTypes:=ds.Unit_Type.all().orderBy("Name 
> asc").toCollection("Name";dk with primary key)   
> COLLECTION TO ARRAY(Form.col_UnitTypes;Form.box_Type_Unit;"Name") 
> 
> does not work ("4D was expecting a Variable" error).
> 
> 
> Is there now way to set up an ARRAY for Form.Array usage?
> 
> Thanks for any observations,
> 
> Chris
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> 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)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

can an array be added to a Form's object list i.e. Form.Array?

2018-10-02 Thread Chris Belanger via 4D_Tech
I am trying to make a ComboBox object that is local to the Form. Hence I need 
the Array to be a Form. object

ARRAY TEXT(Form.ChoicesArray;0) does not work;

Trying to get the data into a COLLECTION and then use COLLECTION TO ARRAY 
(which should define the array easily) does not work:

Form.col_UnitTypes:=ds.Unit_Type.all().orderBy("Name 
asc").toCollection("Name";dk with primary key) 
COLLECTION TO ARRAY(Form.col_UnitTypes;Form.box_Type_Unit;"Name")   

does not work ("4D was expecting a Variable" error).


Is there now way to set up an ARRAY for Form.Array usage?

Thanks for any observations,

Chris


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

v13 - Relate One Selection issue

2018-10-02 Thread Chip Scheide via 4D_Tech
given this table configuration

Animal <-- Animal_Sample_Link ---> Samples

if there is at least 1 [Sample_Animal_Link] record shouldn't the 
following code load the animal record(s)?

QUERY([Sample_Animal_Link];[Sample_Animal_Link]Sample_ID=[Samples]Sample_ID)
RELATE ONE SELECTION([Sample_Animal_Link];[Animal])


I ask because it is not, even after a restart of 4D

Thanks
Chip

---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
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: Thoughts and Suggestions ?

2018-10-02 Thread Luc Devar via 4D_Tech
Offline Data collection system

I have in place such a system that does that via PDF enterable form. 

A Work Order is generated out of 4D creating multiple enterable PDF document 
saved into Drop Box shared directory.  I am using a plugin from Pluggers 
software called QPDF. This tool allows me to create complex enterable PDF 
documents out of 4D.  Each line of a document or each document has a unique iD 
from 4D.  We have different kinds of information that need to be collected and 
different PDF form are used depending on the type of information. PDF can be as 
complex as a input layout or as simple as a listbox.

The iPad sync with DropBox.

The technician go out  into the field-work (no internet connection) and do the 
data collection. The data is stored directly into nicely formatted enterable 
PDF form that was created by 4D. Form can contain text field, drop-down list, 
picture field, text field, radio buttons, etc.  The technician come back to the 
office and syncs the iPad with DropBox.

4D read back the PDF document with the same plugins and store the information.

Contact me if you want to see a demo via an online session.

Luc Devar


**
4D Internet Users Group (4D iNUG)
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: Thoughts and Suggestions?

2018-10-02 Thread Douglas Cryer via 4D_Tech
Ken,

We have two similar use  cases linked to our i.LEVEL solution.
Order Taker - This is for sales agents throughout Europe selling a large range 
of fashion clothing and jewellery
Store Controller - This is for concession store managers travelling the country 
visiting their concessions in hundreds of retail chains

Both systems download sync code data before  they head off to do their jobs and 
when next able upload orders, store notes images and recommendations.  The 
comms is done via REST as we have built a full REST stack into the main system. 
 The Order Taker was originally built on SOAP but we are now transitioning away 
from that and next season it will be fully REST based.

No iPads though.  One or two clients originally suggested that they wanted 
iPads but when we offered them a far cheaper, more reliable  solution (written 
in 4D) that could be used on Mac or PC laptops as well as cheap as chips 
windows 10 tablets we got real traction on sales.  We now have more than half a 
dozen clients using the solutions and approaching hundreds of agents and store 
controllers.

4D is not the best application to write touch based applications in, as it 
still has some issues, but it is an effective and cost effective solution.

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.com 






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