Forum

Define the default ...
 
Notifications
Retirer tout

Define the default value of a predefined Field

4 Posts
2 Utilisateurs
0 Reactions
2,000 Vu
(@tms)
Posts: 36
Active Member
Début du sujet
 
[#5651]

Hello,

With the screen customization plugin, I have created some custom fields (in the project Screen). My aim is to define a default value for a predefined field (in the same screen). I want the value of this predefined field to be the same as the one of a custom field (I have added). I know that I can use an evaluated formula (###EVAL###myEvaluationFormula) with the functions defined in Projeqtor. Do you know which function allows to get the value of a custom/predefined field? Thank you in advance for your return.

Best regards


 
Posté : 3 Jan PM 16:011
(@babynus)
Posts: 14952
Membre Admin
 

Just

###EVAL### $this->yourField;

But notice it is only a "default" value, and formula will be applied only on creation (possibly yourField is not set yet).
To have yourField evaluated at each change of yourFiled, only solution is to set the defautl field as "readonly", then the default value will become a calculated value.


 
Posté : 3 Jan PM 17:011
(@tms)
Posts: 36
Active Member
Début du sujet
 

Thank you for your quick answer. I tried that before. But it wasn't working. I think it's because my predefined field is in the screen "projet - Avancement" and my custom field in the screen "projet" (when using the plugin).
Best regards


 
Posté : 3 Jan PM 17:011
(@babynus)
Posts: 14952
Membre Admin
 

So you may try

###EVAL### $this->ProjectPlanningElement->yourField;

or possibly

###EVAL### $value=$this->ProjectPlanningElement->yourField;

 
Posté : 4 Jan PM 21:011
Share:
Retour en haut