Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 18 SEP 2002 11:35:32AM Mark Ford wrote:

We are trying unsuccessfully to populate a form with an associated table and record id to the form's combo boxes.

We want to be able to populate the item lists of the combo boxes from a table record. Then we set the DEFPROP of those combo boxes with the values that the user selected previously. We would normally hard code the combo droplist right on the form except the item list may change depending on the user.

Can anyone help us out with sample code!

Thanks bery much.


At 18 SEP 2002 01:46PM Richard Hunt wrote:

Mark,

A sample of some code to populate a "COMBOBOX" manually. Two things must be done. You must "SET_PROPERTY" a "LIST" of items, then you might want to "SET_PROPERTY" a "TEXT" item.

To populate the list in the "COMBOBOX", all it is is a "field mark" delimited string of items.

STRING="

STRING=ITEM_ONE

STRING=ITEM_TWO

STRING=ITEM_THREE

RESULT=SET_PROPERTY(FOCUS,'LIST',STRING)

"FOCUS" being the focus of the "COMBOBOX".

You can then select one of the items to display by doing…

RESULT=SET_PROPERTY(FOCUS,'TEXT',ITEM_ONE)

If you want to populate a multivalue field within a table record, then…

STRING=XLATE(TABLE,ID,FIELD,"X")

CONVERT @VM TO @FM IN STRING

RESULT=SET_PROPERTY(FOCUS,'LIST',STRING)

"FIELD" being the field number that holds the multivalue.

Or if each field within a table record is to be listed, then…

STRING=XLATE(TABLE,ID,"","X")

RESULT=SET_PROPERTY(FOCUS,'LIST',STRING)


At 18 SEP 2002 04:37PM John S Edgar wrote:

Thank you very much…… ( for Mark and myself )

John.

Conway Information Systems.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/881548cdc8b8acaa85256c380055a6a0.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1