Dear Cspro Team,
I am using Cspro 7.5 menu program and I have a variable (XX) which have two types of value sets xx_vs1 and xx_vs2 , From another variable (YY) return to this variable with a logic and "Move to" or "reenter" to variable XX , i want to display item labels xx_v2 , is it possible?
Thanks,
reenter
-
- Posts: 1792
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: reenter
I don't think I understand the question. You can use the setvalueset function to set a value set for either XX or YY, even if the value set doesn't "belong" to that item:
setvalueset(XX, XX_VS2); // fine
setvalueset(YY, XX_VS2); // also fine
setvalueset(YY, XX_VS2); // also fine
Re: reenter
Thank you for your response, to make it more clear, i have a value set to Household_interview variable namely Household_interview_Vs1 and Household_interview_Vs2.
On the form Household interview is at the top and "Team Number" is found bellow household interview variable .
Proc Household_interview
.
.
.
Proc Team_number
If team_number in 05 then
Move to Household_interview or reenter to Household_interview
//Here when we move to Household Interview , the value set to be displayed
// needs to be Household_interview_Vs2.
Elseif team_number in 07 then
Move to Household_interview or reenter to Household_interview
//Here when we move to Household Interview , the value set to be displayed
// needs to be Household_interview_Vs2.
Endif;
On the form Household interview is at the top and "Team Number" is found bellow household interview variable .
Proc Household_interview
.
.
.
Proc Team_number
If team_number in 05 then
Move to Household_interview or reenter to Household_interview
//Here when we move to Household Interview , the value set to be displayed
// needs to be Household_interview_Vs2.
Elseif team_number in 07 then
Move to Household_interview or reenter to Household_interview
//Here when we move to Household Interview , the value set to be displayed
// needs to be Household_interview_Vs2.
Endif;
-
- Posts: 1792
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: reenter
If TEAM_NUMBER is located after HOUSEHOLD_INTERVIEW, then you'll have to use visualvalue to get the value:
PROC HOUSEHOLD_INTERVIEW
onfocus
if visualvalue(TEAM_NUMBER) = 5 then
setvalueset({...})
else
// ...
endif;
onfocus
if visualvalue(TEAM_NUMBER) = 5 then
setvalueset({...})
else
// ...
endif;
Re: reenter
Many thanks, it is working now.