Re: Data Dictionary to Structure via XML ?

2016-10-30 Thread Arnaud de Montard

> Le 12 oct. 2016 à 13:10, Peter Jakobsson  a écrit :
> 
> [...]
> To me, SQL is really a runtime, not design time tool and I prefer not to use 
> it when 4D has all these design-time specific options that are native. [...]

Hi Peter,
much later… 

Just to mention that yesterday I had to add a bunch of tables (~50) and fields 
to an existing DB. I used SQL from spreadsheet definitions(save as cvs, read 
it, etc.) 

If one doesn't mind table positioning (*) and color in the structure editor, I 
found it very easy. Add table or field if it doesn't exist/modify else, delete 
errors, add "basic fields" (primary and foreign keys, for example), the 
TRAILING option… Worked great for me, I never added so much things in such a 
short time. I'm less happy with forms now  :-/

(*) 4D puts new tables "where there is place" from the top left corner, as I 
could see looking at the structure in 15% zoom and executing step by step. 

-- 
Arnaud de Montard 


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

Re: How to use Process Tags with c-objects?

2016-10-30 Thread Lee Hinde
re: var obj = $4DHTML(JSON Stringify(whatever));


Say what? What's that $syntax?

2016-10-30 15:53 GMT-07:00 Keisuke Miyako :

> 
>
> var obj = $4DHTML(JSON Stringify(whatever));
>
> or
>
> var obj = ;
>
> 
>
>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to use Process Tags with c-objects?

2016-10-30 Thread Douglas von Roeder
Kirk:

The code below is used to populate dynamic variables with data coming in
from SAP via XML:


*C_LONGINT*($index_L)

*For *($index_L;1;*OT_SizeOfArray *
($orderListHandle_L;"$orderDetailObjectNames_AT"))


* C_TEXT*($objectName_T)

 $objectName_T:=*OT_GetArrayText *
($orderListHandle_L;"$orderDetailObjectNames_AT";$index_L)



 *C_TEXT*($tag_T)

 $tag_T:=*OT_GetArrayText *
($orderListHandle_L;"$orderObjectTagNames_AT";$index_L)


 (*OBJ_GPBN *($objectName_T))->:=*OB Get*($orderHeaderDetail_O;$tag_T;
*Type*(*OBJ_GPBN *($objectName_T)->))


*End for *




The OT_ methods are wrapper routines for Object Tools and OBJ_GPBN is a
wrapper for Object get pointer(Object named).


When working with OB commands or OT commands, I use wrapper routines where
possible but, in this case, I'm using the 4D command because I want to use
a very, very nice feature that 4D included in OB Get - the Type parameter.
When creating a variable on a form, dynamic or otherwise, the Type is
important because it allows us to assign a filter/format. The Type
parameter of OB Get plays right into that.


While this isn't using Process tags, "it's the same (but different)" in
that it's a way to parse incoming JSON into variables.


After the first version of this code was released, we decided to add
another value coming back from SAP. All I had to do was create a dynamic
variable with a name that matched the name coming in from SAP XML payload,
select the variable and set the Type value in the property list, and assign
a format to the dynamic variable. Next time I got data back from SAP, the
tag in the JSON matched the name of the object on the form and the variable
was populated. No code change. No bugs. *Very* bueno.


BTW, we are using code from the 4D tech note component that converts XML to
JSON - many thanks to Timothy Tse for the tech note.




--
Douglas von Roeder
949-336-2902

On Sun, Oct 30, 2016 at 12:22 PM, Lee Hinde  wrote:

> It feels like you'd have to use 4Deval.  But, I think I'd unpack a c_object
> with javascript once in the web page.
>
>
> On Sun, Oct 30, 2016 at 8:38 AM, Kirk Brooks  wrote:
>
> > I haven't used Process Tabs very much but it is promising.
> >
> > I use javaScript and jQuery to turn JSON into web pages and web areas. I
> > thought I'd look at doing this on the 4D side with process tags but I
> can't
> > find a clean way to process data from a c-object. All my solutions are
> > overly involved which makes me think I'm missing something.
> >
> > Is anyone doing this also? Could you share a few tips on how you make it
> > work?
> >
> > Thanks
> >
> > --
> > Kirk Brooks
> > San Francisco, CA
> > ===
> >
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://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: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to use Process Tags with c-objects?

2016-10-30 Thread Kirk Brooks
Hi Miyako,
Yes, that's what I do now to initiate a page and then parse with js.

After a little more playing around I find this works:




We don't currently have any way to iterate over elements of an array within
the object but this is something to work with.


2016-10-30 15:53 GMT-07:00 Keisuke Miyako :

> you just do something like:
>
> 
>
> var obj = $4DHTML(JSON Stringify(whatever));
>
> or
>
> var obj = ;
>
> 
>
>
>
> 宮古 啓介
> セールス・エンジニア
>
> 株式会社フォーディー・ジャパン
> 〒150-0043
> 東京都渋谷区道玄坂1-10-2 渋谷THビル6F
> Tel: 03-6427-8441
> Fax: 03-6427-8449
>
> keisuke.miy...@4d.com
> www.4D.com/JP
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>



-- 
Kirk Brooks
San Francisco, CA
===
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to use Process Tags with c-objects?

2016-10-30 Thread Lee Hinde
Ah, R release. Thanks!

> On Oct 30, 2016, at 7:15 PM, Keisuke Miyako  wrote:
> 
> "Alternative syntax for 4DTEXT, 4DHTML, 4DEVAL"
> 
> http://doc.4d.com/4Dv15R5/4D/15-R5/4D-Transformation-Tags.300-2936578.en.html
> 
> since 15R4
> 
>> 2016/10/31 9:19、Lee Hinde  のメール:
>> re: var obj = $4DHTML(JSON Stringify(whatever));
>> Say what? What's that $syntax?
> 
> 
> 宮古 啓介
> セールス・エンジニア
> 
> 株式会社フォーディー・ジャパン
> 〒150-0043
> 東京都渋谷区道玄坂1-10-2 渋谷THビル6F
> Tel: 03-6427-8441
> Fax: 03-6427-8449
> 
> keisuke.miy...@4d.com
> www.4D.com/JP
> 

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

How to use Process Tags with c-objects?

2016-10-30 Thread Kirk Brooks
I haven't used Process Tabs very much but it is promising.

I use javaScript and jQuery to turn JSON into web pages and web areas. I
thought I'd look at doing this on the 4D side with process tags but I can't
find a clean way to process data from a c-object. All my solutions are
overly involved which makes me think I'm missing something.

Is anyone doing this also? Could you share a few tips on how you make it
work?

Thanks

-- 
Kirk Brooks
San Francisco, CA
===
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**