Using oxy_add to assign an attribute value
Posted: Fri Jul 28, 2017 6:21 pm
Hello,
I am using the oxy_add function within the Oxygen Web Author environment to perform calculations on various attribute values.
For example, in my estimatedModCost element, I have attributes that hold values for the number of hours it takes to repair a unit. An estimatedModCost element might look like this:
The css is below, but I use oxy_add to display the total number of hours required.
My question is, if I add an attribute "totalTimeForMod", is it possible to set that value using oxy_add? That is, can I have oxy_add calculate what that value should be and then modify the attribute value somehow?
Thanks!
John
I am using the oxy_add function within the Oxygen Web Author environment to perform calculations on various attribute values.
For example, in my estimatedModCost element, I have attributes that hold values for the number of hours it takes to repair a unit. An estimatedModCost element might look like this:
Code: Select all
<estimatedModCost laborPerUnitPreperation="1.0" laborPerUnitInstallation="2.0" laborPerUnitTesting="0.5">
My question is, if I add an attribute "totalTimeForMod", is it possible to set that value using oxy_add? That is, can I have oxy_add calculate what that value should be and then modify the attribute value somehow?
Thanks!
John
Code: Select all
/* Labor hours*/
oxy_label(text, "Estimated Labor Hours", styles, "text-decoration:underline;")"\A"
oxy_label(text, "Estimated labor hours per unit for: ", width, 100%)
oxy_label(text, "Preparation: ", width, 12%)
oxy_textfield(edit, "@laborPerUnitPreparation", width, 5%)
oxy_label(text, " ", width, 2%)
oxy_label(text, "Installation: ", width, 12%)
oxy_textfield(edit, "@laborPerUnitInstallation", width, 5%)
oxy_label(text, " ", width, 2%)
oxy_label(text, "Test: ", width, 12%)
oxy_textfield(edit, "@laborPerUnitTest", width, 5%)"\A"
oxy_label(text, "Total labor hours per unit: ", width, 30%)
oxy_add(attr(laborPerUnitPreparation), attr(laborPerUnitInstallation), attr(laborPerUnitTest), 'number')"\A\A"