0

I would like to create a group of fields by code.

create group
set the name of it to "myGroup"

create field
set the name of it to "myField"
set the top of field "myField" to 10
set the width of field "myField" to 100
set the left of  field "myField" to 20

-- add myField to myGroup
-- ??

set the backgroundBehavior of group "myGroup" to true 

Questions

  • How do I add the field "myField" to the group "myGroup"?
  • And how do I add the group to the current card?
  • How do I test if a card includes group "myGroup"?
ekad
  • 14,436
  • 26
  • 44
  • 46
z--
  • 2,186
  • 17
  • 33

1 Answers1

5

To add a field to a group:

create field "myField" in group "thisGroup"

You can then set the other properties normally. You could also set the name separately, but it's convenient to include it in the "create" command.

To add an existing group to the current card:

place group "myGroup" onto this card

You can substitute any card reference for "this card". Note that any group that is newly created is automatically placed on the current card. The "place" command is useful only to display a group from another card on the current one.

To see if a group is on the current card:

get there is a group "myGroup" of this card

You can substitute any card reference for "this card".

Jacque
  • 416
  • 2
  • 7