Trying to use a variable in the link expression of a set (dbf).... Something appears to be wrong here.
First, I can't use any of the variables even if they are both "assigned" in the table, and also in the set definition.
I've tried vc_VariableName, and also var->vc_VariableName. Looks OK, but either way I get the error "Field is not recognized" when I attempt to save. (Hence, I can't save the expression!)
Second: When I'm editing the link expression and I press the + key..... I get a list the table fields. At the top of the list I see a "Calc->" entry.
Besides the oddity that the "Calc->" entry exists but not a "Var->" entry..... Even when I try to assign a global variable via a calculated field, I encounter the same problem as above.
I've already tried running the app to insure the global variable is set. It doesn't make a difference. I've also found that when trying to enter characters into a link expression, they don't always appear as they should.....
Ironically you can use variables (and even functions, there's a button for add a function in the link definition) when setting up other aspects of the set..... But variables are apparently not working properly in this one particular spot. ~ I really need to be able to do this. Any suggestions on embedding a variable or function within the link definition? I'm working with a Global variable which is set via script when the application is initialized.
~Going to try and create a global function. NOPE.... That won't take either. FWIW: This value is only assigned once when program initially launches.
(Returns a similar error indicating my function is not recognized.)
All I'm trying to do is assign the parent link expression side to: "MASTERKEY + vc_GlobalVar" (where MASTERKEY is the parent field, and vc_GlobalVar = "000001")
"Hardcoding" the following link expression: MASTERKEY + "000001" works fine. Just can't define via variable/function/calculated value.......
Function:
First, I can't use any of the variables even if they are both "assigned" in the table, and also in the set definition.
I've tried vc_VariableName, and also var->vc_VariableName. Looks OK, but either way I get the error "Field is not recognized" when I attempt to save. (Hence, I can't save the expression!)
Second: When I'm editing the link expression and I press the + key..... I get a list the table fields. At the top of the list I see a "Calc->" entry.
Besides the oddity that the "Calc->" entry exists but not a "Var->" entry..... Even when I try to assign a global variable via a calculated field, I encounter the same problem as above.
I've already tried running the app to insure the global variable is set. It doesn't make a difference. I've also found that when trying to enter characters into a link expression, they don't always appear as they should.....
Ironically you can use variables (and even functions, there's a button for add a function in the link definition) when setting up other aspects of the set..... But variables are apparently not working properly in this one particular spot. ~ I really need to be able to do this. Any suggestions on embedding a variable or function within the link definition? I'm working with a Global variable which is set via script when the application is initialized.
~Going to try and create a global function. NOPE.... That won't take either. FWIW: This value is only assigned once when program initially launches.
(Returns a similar error indicating my function is not recognized.)
All I'm trying to do is assign the parent link expression side to: "MASTERKEY + vc_GlobalVar" (where MASTERKEY is the parent field, and vc_GlobalVar = "000001")
"Hardcoding" the following link expression: MASTERKEY + "000001" works fine. Just can't define via variable/function/calculated value.......
Function:
Code:
'Date Created: 17-Feb-2016 05:57:24 PM 'Last Updated: 17-Feb-2016 05:59:12 PM 'Created By : Business 'Updated By : Business FUNCTION MerchantSuffix_fnc AS C ( ) dim global vc_Suffix as C 'global variable initialized via autoexec script vc_Suffix = lookupc("C","MERCHLINK","parmfield0","setup_cfg","Prmd__") select case case vc_Suffix = "00000" 'suffix not needed vc_Suffix = "" case else vc_Suffix = "_" + alltrim(vc_Suffix) 'append suffix end select MerchantSuffix_fnc = alltrim(vc_Suffix) END FUNCTION '========================================================== ui_msg_box("MerchantID",MerchantSuffix_fnc()) end
Comment