- This topic has 3 replies, 2 voices, and was last updated 9 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Integrated Application Platform
Integrated Application Platform › Forums › General › [SOLVED]How to create a customized Id control?
I have a table called Item (No., Name,Price, etc…). And I have many other tables where item No. is linked. At the moment, I create Id control for each of the places where item no. is needed. e.g.
Control: (Id "item"
field: item_No
columns: #(item_No,
item_Name,
item_Price)
width: 20,
style: 0x0008)
this works, but the problem is I have to repeatedly create the same piece of code everywhere.
My question is, can i wrap this up as a customized control, and assign the new control wherever the item no. is linked?
ok i got it,
IdControl
{
New()
{
super(query: "item",
field: 'item_No'
columns: #(item_No,
item_Name,
item_Price)
)
}
}
That is correct.
Another option is to use Field_ definitions (which can use inheritance) For example:
Field_item
Field_date
{
Prompt: 'Item'
Control: (Id ...)
}
And then use ‘item’ in your screens.
hi andrew, thanks for the tip indeed!