Hi, I've recently started progamming an app in Sesame and I have a question about the scope of user defined variables.
I've created a function that lives in the Global Code area. The function takes a String Array as a parameter.
I want to create that array just once, to cut down on repetition and increase speed. But I get an error when I include the var declaration in the global code area. And if I declare it in an element's 'OnFormEntry' section, no other elements can see the array, which means I've have to declare it and populate it all over again.
Is there a way to declare a variable that all elements can use without making it a Global Static variable?
For example, in Global Code:
var orderelements as String
orderelements = @StringArrayElementList()
function calculate_total(orderelements as String) as double
return 0
end function
and then elsewhere in an 'OnFormChange' area of an element I would call
total = calculate_total(orderelements)
this is just a general example, but I hope you get the gist.
Thanks
Derrick