Automated Generation of Form Variables

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Automated Generation of Form Variables

4D Tech mailing list
Is there a way to generate the Form.table.dataClassAttribute and their labels
to populate a form like is done for fields and labels when creating a form
via the wizard?



--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Automated Generation of Form Variables

4D Tech mailing list
That is a logical step but it's not available that I'm aware of.

Perhaps this would be a good feature request.

--
Douglas von Roeder
949-336-2902


On Mon, Aug 6, 2018 at 9:25 AM Guru via 4D_Tech <[hidden email]>
wrote:

> Is there a way to generate the Form.table.dataClassAttribute and their
> labels
> to populate a form like is done for fields and labels when creating a form
> via the wizard?
>
>
>
> --
> Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Automated Generation of Form Variables

4D Tech mailing list
In reply to this post by 4D Tech mailing list
I don't use the form wizard, so I'm not sure I understand what you mean about Form.table.dataClassAttribute. But you can certainly generate your own form with fields and labels in version 17. To generate a field, I use a method like this:


 //Create field object.

  //$0 - Field object.
  //$1 - Field pointer.

C_OBJECT($0)
C_POINTER($1)

$0:=New object
$0.type:="input"
$0.dataSource:=TB_Field_full_name ($1) `Like [Table_Name]Field_Name

John DeSoi, Ph.D.




> On Aug 3, 2018, at 9:42 AM, Guru via 4D_Tech <[hidden email]> wrote:
>
> Is there a way to generate the Form.table.dataClassAttribute and their labels
> to populate a form like is done for fields and labels when creating a form
> via the wizard?

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Automated Generation of Form Variables

4D Tech mailing list
John:

The current version of the form editor allows us to put fields on a form
that are coupled to the underlying record. We can now pass an object as $3
to the dialog command and, if the value in Expression/Variable name is
Form.<objectname>, that form object is coupled to the object at $3.

With that new feature, it's a natural extension of the form wizard to have
the form wizard populate the form with form objects that have the value in
"Expression/Variable Name" already populated. It will save a huge amount of
mindless grunt work.

I'm thrilled to see this new feature because it saves a lot of code to bind
form locals to objects (I've been using ObjectTools). Until the form wizard
can create forms with form objects that tie back to objects, we're still
doing things by hand, one object at a time.

--
Douglas von Roeder
949-336-2902


On Mon, Aug 6, 2018 at 9:50 AM John DeSoi via 4D_Tech <[hidden email]>
wrote:

> I don't use the form wizard, so I'm not sure I understand what you mean
> about Form.table.dataClassAttribute. But you can certainly generate your
> own form with fields and labels in version 17. To generate a field, I use a
> method like this:
>
>
>  //Create field object.
>
>   //$0 - Field object.
>   //$1 - Field pointer.
>
> C_OBJECT($0)
> C_POINTER($1)
>
> $0:=New object
> $0.type:="input"
> $0.dataSource:=TB_Field_full_name ($1) `Like [Table_Name]Field_Name
>
> John DeSoi, Ph.D.
>
>
>
>
> > On Aug 3, 2018, at 9:42 AM, Guru via 4D_Tech <[hidden email]>
> wrote:
> >
> > Is there a way to generate the Form.table.dataClassAttribute and their
> labels
> > to populate a form like is done for fields and labels when creating a
> form
> > via the wizard?
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************