Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Define the default ...
 
Notifications
Clear all

Define the default value of a predefined Field

4 Posts
2 Users
0 Reactions
2,037 Views
(@tms)
Posts: 36
Active Member
Topic starter
 
[#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


 
Posted : 03 Jan 2019 16H17
babynus
(@babynus)
Posts: 14966
Main Contributor 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.


 
Posted : 03 Jan 2019 17H25
(@tms)
Posts: 36
Active Member
Topic starter
 

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


 
Posted : 03 Jan 2019 17H44
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

So you may try

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

or possibly

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

 
Posted : 04 Jan 2019 21H47
Share:

Scroll to Top