Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
passing variable b/w .cfg <items>
craigm
I have two items. Each uses a callout. Is there any way to pass a param to the second callout?
Say the result of the first callout is "75". I'd like to do this in the second calllout:
[cgi-callout url="/iw-bin/callout.ipl/
param
.txt" label="Select"/]
where param = 75
Find more posts tagged with
Comments
iwovGraduate
If you carefully look at the callback javascript in the callout, it iterates through all the form variables. In the second callout you can just grab the value of the first callout.
Another option might be FormAPI...
craigm
Thanks. Yes, this is what I want to do. I just don't know <i>how</i> it's done.
I should've mentioned that my callouts go to different .ipl files and I don't have formAPI (we're not on 5.5.2).
Adam Stoller
If I'm understanding you correctly - you have two field, each of which have a callout button associated with them, and you want one of the callouts to evaluate things based on information that was obtained by the other callout - yes?
Q: Does it matter what order the callouts are activated in? I.e. if you click the "second" callout button before the "first" one - will it adversely effect the outcome?
I see two possibilities (neither of which do I have a lot of experience with personally, but ...):
1) Have a single callout that does double-duty and fills in *both* fields
2) Have the second callout check the value in the field associated with the first callout. If the value you are looking for is *not* the value that actually gets filled into the first field, then have the first callout set *two* fields, one of which is hidden - and have the second callout access that hidden field.
Not sure if this really helps, but I hope it does.
--fish
(Interwoven Senior Technical Consultant)
craigm
Hi fish,
First, I'm new to perl so the solution may be simple but I can't visualize it.
Yes, I want the result (user chooses from a dropdown) of the first callout to affect which file I grab on the second callout. If the user chooses 75 on the first callout, I want the second callout to go get 75.txt.
I'm using the example_callout.ipl and while I'm able to see (iterate over) all of the items/fields in my .cfg, I can't figure out how to set any of their values (other than the one from which I'm doing the callout).
Ideally, in my second callout, I'd say:
Get the value of [item1];
Oh, item1 = 75? Then go parse 75.txt
Thanks for your help.