Hi,
I'm still learning syntax so i'm hoping this is as simple as rephrasing / combing, but i basically have a couple instances where i want to use an expression to apply in two different ways, but it seems i can't use "for each line" twice like this.
(On load)
- for each line in Prod_subform
- {
- line.Previous = true;
- }
- for each line in Misc_Subform
- {
- line.Previous2 = true;
- }
(On Success)
- subformContent = "";
- subformContent2 = "";
- for each line in Prod_subform
- {
- if (!line.Previous)
- {
- //fetch product records
- get_products = Products_Form [ID = line.Products];
- //fetch container records
- get_containers = Containers_Form [ID = line.Containers];
- subformContent = (((((((subformContent + "[" + line.Qty + " <b>x</b> " + get_containers.Containers_Database) + "]") + " <b>of ") + get_products.Products_Database) + "</b> for $[") + line.Price) + "]") + "<br><br>";
- }
- }
- for each line in Misc_Subform
- {
- if (!line.Previous2)
- {
- //fetch equipment records
- get_equipment = Equipment_Lab_Form [ID = line.Equipment_Lab_Database];
-
- subformContent2 = ((((subformContent2 + "[" + line.Qty + " <b>of</b> " + get_equipment.Equipment_Lab_Database) + "] for $[") + line.Price + "] ") + "Notes: ") + line.Notes + "<br><br>";
- }
- }
Previous & Previous2 are decision boxes. How do i phrase the code properly, if you can see what i'm trying to do?