Hi,
I'm experiencing a curious issue. I'll 'save' a code segment using the freeflow script editor (in the old app builder), Zoho will say 'Saved' but then when I click back on the 'On Input' script, all the code is gone. It seems like the script validator is faulty and does not show errors when I click save.
It's very frustrating as the first time I did it, I didn't realise and lost about 50 lines of code. Now I'm aware because there's a telltale sign: the dot next to the input field shows as grey instead of green (see screenshot).
Here is an example of code that refuses to save. The last line (
input.Total_Price = 0.0;) causes the editor to wipe the code. Total Price is a currency field so I'm not sure why it's causing a problem..
- product_type = Products[ID == row.Item_Type];
- max_price = product_type.Max_Price;
- this_row_price = row.Price_Per_Piece;
- if (max_price < this_row_price)
- {
- alert("Warning: the price you entered exceeds the maximum price for this product ($" + max_price + " per piece).");
- row.Price_Per_Piece = 0.0;
- }
- total_price = 0.0;
- for each item in input.Items
- {
- item.Total_Price = (item.Quantity * item.Price_Per_Piece);
- total_price = (total_price + item.Total_Price);
- }
- //input.Total_Price = 0.0;