Re: 4D Summit 2018 Comments - Import XML Structure

2018-04-12 Thread JPR via 4D_Tech
[JPR]

Hi All,

In fact, it seems that it has been a little misunderstanding in this case of 
XML Structure. What LR was talking about is the NEW way which has been 
demonstrated by Laurent Esnault during the Summit.

With the new way of handling the 4DB (usually named 'the structure'), it will 
be possible to save everything into text files. Forms will be JSON files, 
Methods will be Text files, and Structure will be XML Files. And you will be 
able to export and reimport any part. And this is what Laurent explained.

I perfectly understand that you are dreaming so hard of it, that you want to 
believe that it is already available! But in fact you will have to wait a 
little bit more, until it will be fully tested and introduced into a R-release.

Sorry about breaking your dreams, but this is the way it works.

And, BTW, I have also to confess that Santa Claus doesn't exist...

My very best,

JPR



> On 11 Apr 2018, at 07:57, 4d_tech-requ...@lists.4d.com wrote:
> 
> I suggest you mention JPR in this message so that JPR will see it and
> perhaps pass your comments along :)
> 
> Pat
> 
> On 10 April 2018 at 22:33, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> 
>> On Apr 10, 2018, at 12:40 PM, Randy Engle wrote:
>> 
>>> I tried this from several different angles (16r6)
>>> Import XML Structure works like importing records.
>>> It doesn't "update" or "merge", just imports new structure elements
>> (Tables)
>>> 
>>> Perhaps Laurent was confused at that moment?
>> 
>> You are right Randy.  I did some quick tests and IMPORT STRUCTURE command
>> will not update existing tables. The documentation says "If an imported
>> table has the same name as a local one, an error is generated and the
>> import operation is aborted.” and this is the case.
>> 
>> So Laurent must have been confused and maybe thought, why create fields
>> with SQL when you could create tables and fields with the IMPORT STRUCTURE
>> command. You can do that, but what we want to do is update existing tables
>> and fields and that is currently not possible with this command.
>> 
>> So we are stuck again with the inability to set the “map NULL values to
>> blank” field property when creating fields with SQL.
>> 
>> 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: 4D Summit 2018 Comments - Import XML Structure

2018-04-10 Thread Thomas Maul via 4D_Tech
>So Laurent must have been confused and maybe thought, why create fields 
> with SQL when you could create tables and fields with the IMPORT STRUCTURE 
> command.

While I did not shared that conversation, I can only imagine that there was a 
misunderstanding in "how to modify the XML based structure".
LR is usually not working with the version we just release, he is often far 
ahead.
And for the ones visiting 4D Summit they might remember the last presentation 
"peak into future", where the whole binary structure document was stored as 
text based project folder. The structure itself is in this case just the XML 
file you get when you do a Structure export, but  you never need to import it, 
just modify the structure on disk with a text editor (or by code) and restart 
4D. And I could imagine that's the procedure he had in mind.

As this way is not useable for the rest of us for today, I would use the XML 
export to identify relations names to change - and then go through the 
structure. I know, this can be an hour of work. I did myself so, when we 
introduced 4D Mobile with v14, as this already used the relation names. And I'm 
currently doing it again, as I have now a better understanding of how to choose 
good names.

Best regards
Thomas Maul





**
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: 4D Summit 2018 Comments - Import XML Structure

2018-04-10 Thread Julio Carneiro via 4D_Tech
I believe LR may have suggested importing XML into a new structure. That’ll 
give you what you want. You can then open the old structure with a 4D copy and 
drag methods & forms across.

depending on the size (and age) of your structure, probably easier to manually 
rename the relations, I guess

> On Apr 10, 2018, at 6:33 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> On Apr 10, 2018, at 12:40 PM, Randy Engle wrote:
> 
>> I tried this from several different angles (16r6)
>> Import XML Structure works like importing records.
>> It doesn't "update" or "merge", just imports new structure elements (Tables)
>> 
>> Perhaps Laurent was confused at that moment?
> 
> You are right Randy.  I did some quick tests and IMPORT STRUCTURE command 
> will not update existing tables. The documentation says "If an imported table 
> has the same name as a local one, an error is generated and the import 
> operation is aborted.” and this is the case.
> 
> So Laurent must have been confused and maybe thought, why create fields with 
> SQL when you could create tables and fields with the IMPORT STRUCTURE 
> command. You can do that, but what we want to do is update existing tables 
> and fields and that is currently not possible with this command. 
> 
> So we are stuck again with the inability to set the “map NULL values to 
> blank” field property when creating fields with SQL. 
> 
> 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
> **

--
Julio Carneiro
jjfo...@gmail.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: 4D Summit 2018 Comments - Import XML Structure

2018-04-10 Thread Pat Bensky via 4D_Tech
I suggest you mention JPR in this message so that JPR will see it and
perhaps pass your comments along :)

Pat

On 10 April 2018 at 22:33, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> On Apr 10, 2018, at 12:40 PM, Randy Engle wrote:
>
> > I tried this from several different angles (16r6)
> > Import XML Structure works like importing records.
> > It doesn't "update" or "merge", just imports new structure elements
> (Tables)
> >
> > Perhaps Laurent was confused at that moment?
>
> You are right Randy.  I did some quick tests and IMPORT STRUCTURE command
> will not update existing tables. The documentation says "If an imported
> table has the same name as a local one, an error is generated and the
> import operation is aborted.” and this is the case.
>
> So Laurent must have been confused and maybe thought, why create fields
> with SQL when you could create tables and fields with the IMPORT STRUCTURE
> command. You can do that, but what we want to do is update existing tables
> and fields and that is currently not possible with this command.
>
> So we are stuck again with the inability to set the “map NULL values to
> blank” field property when creating fields with SQL.
>
> 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
> **
>



-- 
*
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: 4D Summit 2018 Comments - Import XML Structure

2018-04-10 Thread Tim Nevels via 4D_Tech
On Apr 10, 2018, at 12:40 PM, Randy Engle wrote:

> I tried this from several different angles (16r6)
> Import XML Structure works like importing records.
> It doesn't "update" or "merge", just imports new structure elements (Tables)
> 
> Perhaps Laurent was confused at that moment?

You are right Randy.  I did some quick tests and IMPORT STRUCTURE command will 
not update existing tables. The documentation says "If an imported table has 
the same name as a local one, an error is generated and the import operation is 
aborted.” and this is the case.

So Laurent must have been confused and maybe thought, why create fields with 
SQL when you could create tables and fields with the IMPORT STRUCTURE command. 
You can do that, but what we want to do is update existing tables and fields 
and that is currently not possible with this command. 

So we are stuck again with the inability to set the “map NULL values to blank” 
field property when creating fields with SQL. 

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: 4D Summit 2018 Comments - Import XML Structure

2018-04-10 Thread Randy Engle via 4D_Tech
I tried this from several different angles (16r6)
Import XML Structure works like importing records.
It doesn't "update" or "merge", just imports new structure elements (Tables)

Perhaps Laurent was confused at that moment?



Randy Engle, Director
XC2 Software LLC – XC2LIVE!

-Original Message-
From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Patrick Emanuel via 
4D_Tech
Sent: Tuesday, April 10, 2018 8:44 AM
To: 4d_tech@lists.4d.com
Cc: Patrick Emanuel 
Subject: Re: 4D Summit 2018 Comments

Hi,

>> naming relations is needed to take make the code readable. 
>Laurent's suggestion is to export the structure in XML, modify all the
relation names in the text file, and reimport the structure as XML. It will be 
faster than to go across the complete graphical structure representation. 


I've just tried this and get an error message because table already existed 
(with a version < v17). Does it work started with the v17?
Just to know.



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