Hello-A new programmer here asked me a question and I want to make sure there isn't a way to do this that I am missing. I know how to create dymanic queries...is it possible to create dynamic assign statements?
Example (a very simple one...our real life scenario is more complex)
A window has two fill-in widgets. One is called "name1" and one is called "name2".
In one scenario we want to update name1. If other conditions exist, then name2 is to be updated.
Without some sort of dynmaic way to build the assign statement, we'd have code like:
if conditionA = true then
assign name1:screen-value = "valueA".
else if conditionB = true then
assign name2:screen-value = "valueB".
Is there a way to dynamically create our assign statement...something like:
def var v-widgetname as c no-undo.
assign v-widgetname = if conditionA = true then "name1"
else "name2".
Again, this is a very watered down version of our real-life scenario....I realize in the simple example above, building the assign statement wouldn't add much value.
I've hit the archived discussions here and did a lot of searching around on the knowledge base, but so far didn't find anything like this. Before I tell our green programmer that there is no way to do this, I want to make sure I'm not missing something obvious.
Thanks.
Example (a very simple one...our real life scenario is more complex)
A window has two fill-in widgets. One is called "name1" and one is called "name2".
In one scenario we want to update name1. If other conditions exist, then name2 is to be updated.
Without some sort of dynmaic way to build the assign statement, we'd have code like:
if conditionA = true then
assign name1:screen-value = "valueA".
else if conditionB = true then
assign name2:screen-value = "valueB".
Is there a way to dynamically create our assign statement...something like:
def var v-widgetname as c no-undo.
assign v-widgetname = if conditionA = true then "name1"
else "name2".
Again, this is a very watered down version of our real-life scenario....I realize in the simple example above, building the assign statement wouldn't add much value.
I've hit the archived discussions here and did a lot of searching around on the knowledge base, but so far didn't find anything like this. Before I tell our green programmer that there is no way to do this, I want to make sure I'm not missing something obvious.
Thanks.