Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6SP5 - Table of Default Values and Validation for Cri
Message
 
À
03/06/2003 09:42:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00795245
Message ID:
00796565
Vues:
20
This is the final piece of art that you had suggested. Thanks. Any suggestions.

BO.DefaultRecords()
THIS.WriteToViewDBC()
BO.WriteToViewDBC
SCAN
	= DBSETPROP("l" + v_mFieldDefaultsValids.cViewFldName, "FIELD", "DefaultValue", v_mFieldDefaultsValids.mDefault)
	= DBSETPROP("l" + v_mFieldDefaultsValids.cViewFldName, "FIELD", "RuleExpression", v_mFieldDefaultsValids.mValidate)
	= DBSETPROP("l" + v_mFieldDefaultsValids.cViewFldName, "FIELD", "RuleText", v_mFieldDefaultsValids.mValidMsg)
ENDSCAN
TextBox.Valid()
THIS.CheckValidations()
TextBox.CheckValidations()
LOCAL lcValidation

lcValidation = DBGETPROP("l" + THIS.CONTROLSOURCE, "FIELD", "RuleExpression")

IF (!EMPTY(lcValidation)) AND (!EVALUATE(lcValidation))
	= MESSAGEBOX(IIF(TYPE(THIS.cAssociatedLabel + ".CAPTION") = "C", ;
		EVALUATE(THIS.cAssociatedLabel + ".CAPTION") + ": ", "") + ;
		EVALUATE(DBGETPROP("l" + THIS.CONTROLSOURCE, "FIELD", "RuleText")))
ENDIF
>>>OK so you want to manage from another table as metadata. How about doing your way but changing default/validation for view once at a suitable place (typically when metadata is edited and saved).
>>
>>Yes
>>
>>>
>>>ie : You could do like this :
>>>
>>>
>>>open data myData
>>>select metadata
>>>scan
>>>  lcViewField = trim(VievName -'.'-ViewFieldName)
>>>  DBSetProp(lcViewField,"FIELD","RuleText",FieldRuleText)
>>>  DBSetProp(lcViewField,"FIELD","RuleExpression",FieldRuleExpr)
>>>  DBSetProp(lcViewField,"FIELD","DefaultValue",FieldDefaultExpr)
>>>endscan
>>>
Cetin
>>
>>Wow that means that I can do this once (at time of reinstllation) and I can avoid unnecesary function calls.
>>
>>I will try this at the soonest.
>
>Yes. Also after doing that :
>compile database DBCName && VFP6 SP3 and later
>Cetin
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform