#uniface-10
I am trying to dim and resurrect a field in a DSP in response to user actions.
I was trying $fieldproperties(field)="html:disabled" (which I thought is what the help pointed to) without success.
I can dim the field with $fieldsyntax(field)="DIM" which successfully sets the disabled attribute.
However, neither $fieldsyntax(field)="" nor $fieldsyntaxt(field)="YED,YPR" nor $fieldproperties(field)="!html:disabled" seem to do the trick for allowing entry again.
What is the trick to remove the disabled attribute? (preferably from proc code but I suppose I can incorporate a weboperation if necessary.
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
Page 1 / 1
#uniface-10
I am trying to dim and resurrect a field in a DSP in response to user actions.
I was trying $fieldproperties(field)="html:disabled" (which I thought is what the help pointed to) without success.
I can dim the field with $fieldsyntax(field)="DIM" which successfully sets the disabled attribute.
However, neither $fieldsyntax(field)="" nor $fieldsyntaxt(field)="YED,YPR" nor $fieldproperties(field)="!html:disabled" seem to do the trick for allowing entry again.
What is the trick to remove the disabled attribute? (preferably from proc code but I suppose I can incorporate a weboperation if necessary.
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
I am trying to dim and resurrect a field in a DSP in response to user actions.
I was trying $fieldproperties(field)="html:disabled" (which I thought is what the help pointed to) without success.
I can dim the field with $fieldsyntax(field)="DIM" which successfully sets the disabled attribute.
However, neither $fieldsyntax(field)="" nor $fieldsyntaxt(field)="YED,YPR" nor $fieldproperties(field)="!html:disabled" seem to do the trick for allowing entry again.
What is the trick to remove the disabled attribute? (preferably from proc code but I suppose I can incorporate a weboperation if necessary.
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
fieldsyntax is an occurrence level property.
Use Deserialize triggers to apply changes or secure dynamic changes done before in the Serialize triggers
I have this example:
In the preSerialize trigger (Pre Save Occurrence in Uniface 9.7)
if ($dbocc(EDATA) )
fieldsyntax FLD1.EDATA,"NED"
else
fieldsyntax FLD1.EDATA,"YED"
endif
and in the postDeserialize (Post Load Occurrence in Uniface 9.7)
if ($occcrc(EDATA) != "")
fieldsyntax FLD1.EDATA,"NED"
else
fieldsyntax FLD1.EDATA,"YED"
endif
Now existing occurrences can't be changed and new occurrences can be changed.
------------------------------
Peter Beugel
Rocket Internal - All Brands
Amsterdam NL
------------------------------
Which triggers are you using ?
fieldsyntax is an occurrence level property.
Use Deserialize triggers to apply changes or secure dynamic changes done before in the Serialize triggers
I have this example:
In the preSerialize trigger (Pre Save Occurrence in Uniface 9.7)
if ($dbocc(EDATA) )
fieldsyntax FLD1.EDATA,"NED"
else
fieldsyntax FLD1.EDATA,"YED"
endif
and in the postDeserialize (Post Load Occurrence in Uniface 9.7)
if ($occcrc(EDATA) != "")
fieldsyntax FLD1.EDATA,"NED"
else
fieldsyntax FLD1.EDATA,"YED"
endif
Now existing occurrences can't be changed and new occurrences can be changed.
------------------------------
Peter Beugel
Rocket Internal - All Brands
Amsterdam NL
------------------------------
fieldsyntax is an occurrence level property.
Use Deserialize triggers to apply changes or secure dynamic changes done before in the Serialize triggers
I have this example:
In the preSerialize trigger (Pre Save Occurrence in Uniface 9.7)
if ($dbocc(EDATA) )
fieldsyntax FLD1.EDATA,"NED"
else
fieldsyntax FLD1.EDATA,"YED"
endif
and in the postDeserialize (Post Load Occurrence in Uniface 9.7)
if ($occcrc(EDATA) != "")
fieldsyntax FLD1.EDATA,"NED"
else
fieldsyntax FLD1.EDATA,"YED"
endif
Now existing occurrences can't be changed and new occurrences can be changed.
------------------------------
Peter Beugel
Rocket Internal - All Brands
Amsterdam NL
------------------------------
There is only one occurrence. and the "DIM" works fine.
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
This is on the onchange trigger of a check box. Tick the checkbox and it fills in a field with a hard coded value and dims it, untick the checkbox and the field is open for manual input.
There is only one occurrence. and the "DIM" works fine.
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
There is only one occurrence. and the "DIM" works fine.
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
The script below works fine
if (checkbox.widgets)
datepicker = $date +14d
putitem/id $fieldproperties(DATEPICKER) , "html:disabled" , "true"
else
; $fieldproperties(DATEPICKER.WIDGETS) = "!html:disabled"
putitem/id $fieldproperties(DATEPICKER) , "html:disabled" , "false"
endif
Peter Beugel
Principal Technical Support Engineer
Rocket Software B.V.
------------------------------
Peter Beugel
Rocket Internal - All Brands
Amsterdam NL
------------------------------
Hello Iain
The script below works fine
Peter Beugel
Principal Technical Support Engineer
Rocket Software B.V.
------------------------------
Peter Beugel
Rocket Internal - All Brands
Amsterdam NL
------------------------------
The script below works fine
if (checkbox.widgets)
datepicker = $date +14d
putitem/id $fieldproperties(DATEPICKER) , "html:disabled" , "true"
else
; $fieldproperties(DATEPICKER.WIDGETS) = "!html:disabled"
putitem/id $fieldproperties(DATEPICKER) , "html:disabled" , "false"
endif
Peter Beugel
Principal Technical Support Engineer
Rocket Software B.V.
------------------------------
Peter Beugel
Rocket Internal - All Brands
Amsterdam NL
------------------------------
putitem/id $fieldproperties(v_fieldname) , "html:disabled","false"
$fieldproperties(v_fieldname)="!style:display"
in order to counter previous settings of either
$fieldproperties(v_fieldname)="style:display=none"
or
putitem/id $fieldproperties(v_fieldname>=), "html:disabled","true"
Is there a putitem version for the style: setting or do I just have to watch the order I do them in?
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
Hmm, since I was writing generic code in a global proc to dim/hide/display fields, I had a bit of a mistake in that I was doing
in order to counter previous settings of either
Is there a putitem version for the style: setting or do I just have to watch the order I do them in?
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
putitem/id $fieldproperties(v_fieldname) , "html:disabled","false"
$fieldproperties(v_fieldname)="!style:display"
in order to counter previous settings of either
$fieldproperties(v_fieldname)="style:display=none"
or
putitem/id $fieldproperties(v_fieldname>=), "html:disabled","true"
Is there a putitem version for the style: setting or do I just have to watch the order I do them in?
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
if (checkbox.widgets)
putitem/id $fieldproperties(DATEPICKER) , "style:display" , "none"
else
putitem/id $fieldproperties(DATEPICKER) , "style:display" , ""
endif
Peter Beugel
Principal Technical Support Engineer
Rocket Software B.V.
------------------------------
Peter Beugel
Rocket Internal - All Brands
Amsterdam NL
------------------------------
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.