#Create CanDo Card Names
4 messages in this thread
Is it possible to build a card # in CanDo so that a GotoCard can be
executed against it? For example, I want to concatenate two strings
together and have them represent the name of a card. I want to be able to
tell CanDo to goto the card who's name is the result of the concatenation.
I would appreciate any ideas about how I can accomplish this task.
Nevin
Nevin,
You can concatenate strings in CanDo, place them into a variable,
then alias that variable so that the GoToCard will work. If you have Ver.
1.5 of CanDo check the supplemental docs on using aliases. Although I
haven't tried this, it seems to be the sort of thing aliases are good for.
However, I'm not sure I understand WHY you need to do this because all card
names must pre-exist, so why not just call the card. If you need a
conditional call, why not just do it in an IF control?
Nevin, as Steve says, it is possible. Heres' a short example:
(say you have cards named: PAGE1, PAGE2, PAGE3, etc…)
The variable 'mypage' holds the page# you want to go to.
LET mypage = 3)
GOTOCARD "PAGE" || mypage
(or GOTOCARD "PAGE" || "3")
This will take you to page 3. You can get 'mypage' from a field, or input,
or whatever….
–jp–seattle–
Thanks for your help, John. I'll try that as soon as I log off here. 8)