Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *Given a control such as an editline named CUSTOMER create a
- *button named CUSTOMER_PDI for this event. When the button is clicked
- *this event will lookup the binding of the associated control and return
- *The dictionary description for that field's binding
- *
- *PDI = POPUP Dictionary Info
- Case Control[-1,'B_'] = "PDI" And Event = "CLICK"
- Gosub popupDictionaryInfo
- ...
- popupDictionaryInfo:
- *Get the name of the control less the _PDI suffix
- ControlTarget = Control[1,Len(Control) - Len('_PDI')]
- *See if the control target has a bound column
- DictFields = Get_Property(@WINDOW : "." : ControlTarget, 'COLUMN')
- If DictFields EQ '' Then
- Msg('The control was not bound to a field')
- End
- *Edit tables can have multiple columns bound. How many?
- DictFieldsCount = DCOUNT(DictFields, @SVM)
- *Get the associated list of bound tables for the control
- DictTables = Get_Property(@WINDOW : "." : ControlTarget, 'TABLE')
- FieldDescriptions = ''
- *Loop through all the bound fields
- For i = 1 To DictFieldsCount
- *Get the AMV list of table and field
- DictTable = "DICT." : DictTables<1,1,i>
- DictField = DictFields<1,1,i>
- *Look-up the field description
- FieldDescription = Xlate(DictTable, DictField, 14, 'X')
- *Construct a list of results.
- FieldDescriptions<-1> = DictTables<1,1,i> : "." : DictField : ":|" : FieldDescription
- Next
- *Display the information
- Swap @FM With '||' In FieldDescriptions
- Msg("Dictionary information:|" : FieldDescriptions)
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement