I’m still fairly new to SuiteCRM development and would appreciate some help on this. I’ve got some calculated fields that are custom coded. What I would like to do is select a specific drop down option based on a numerical calculation (i.e. if # of days = 0, then select option 1; if # of days = 10, then select option 2; etc.) The if else statements for the calculations are coded, I’m just not sure how to reference drop down options and assign a value depending on the calculation.
I appreciate both responses, unfortunately I don’t believe dynamic drop downs can solve my issue unless I’m just not thinking about it correctly. What I’m trying to do is pass a specific value to a drop down field depending on a numerical calculation. For example:
if ($days < 10)
{
$dropdown_c = option1;
}
else if ($days > 10)
{
$dropdown_c = option2;
}
I’ve tried a few different ways and just cannot figure out how to pass a value to the drop down. The drop down and it’s associated list already exist within the module. I’m trying to figure out how to pass a specific value to the drop down depending on the days calculation. (I didn’t include an example of the days calculation, but it’s a basically a days between calculation). I hope I explained that well enough.
First you need to read the documentation regarding Beans in order to understand how the system transfers data between variables. Other way you will need to create from scratch and we might not be able to help you: