Expand my Community achievements bar.

Sum columns based on radio button answer

Avatar

Level 2

Hi,

I am trying to create an if then statement to sum the hours in a table based upon answer given by radio button in LifeCycle Designer.  Currently based upon the answer of the radio button, then certain tables are displayed or hidden.  I wanted to use this same logic in the calculation field.  Below is my both the radio button formula and calculation field formula.  The statements in the calculation field work separately, but not when I am trying to work off the radio button.

I would be open to any suggestions if there is a better way to accomplish this situation.

Thank you.

This is the fomula in the radio button (Java Script):

if ( this.Yes.rawValue == 1 )

        {

        TasksRow.presence = "visible";

        Working.presence = "hidden"

        }

    else

        {

        TasksRow.presence = "hidden";

        Working.presence = "visible";

        }

   

This is the formula in the calculation field (FormCalc):

 

if (form1.#subform[0].ProjMarketSect.QA_Phase_Subform.EmpProjTableCells.QuestionRow.

Subform1.RadioButtonList.Yes.rawValue == 1 )

then

sum(form1.#subform[0].ProjMarketSect.Project_Table.EmpProjInfoTable.

EmpProjInfoRow.EmpProjTableCells.TasksRow.TasksSubform.Table2[*].Row1[*].Task_Hours_Field);

else

$.rawValue = sum(form1.#subform[0].ProjMarketSect.Project_Table.EmpProjInfoTable.

EmpProjInfoRow.EmpProjTableCells.

Working.Subform3.Table6[*].Row1[*].Hours_Field);

endif

0 Replies