Embedded view and radiobuttons

I have a embedded view in a form and i want to have
one column i that view
calculated upon a set of 12 radiobuttons. How do I write
a formula that show (in this case text) different field from the
database. The field depends on what button the user have selected.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Use the IF logic to achieve this.


You cannot do that. It is not possible to give parameters to a view, not even if it is embedded on the form where your buttons are on.

It might be doable in another way though, but I'd have to know whether you want to do this on the web or inside a Notes client, and if you are using R5 or 4.5 or 4.6.
seko22anAuthor Commented:
I have Version 5. I think it maybe possible with
enwironment variables but I have not a working
Seko22an -

You have two choices:
a) specify your embedded view as a 'single category' embedded view
b) replace your existing embedded view with an embedded view 'selected by formula.'

Choice 'A' above is easily documented in the Notes Designer help -- but does not achieve your goal.  It limits the documents displayed in the view according to a single category (for example it would show all the parts of a specified COLOR using your radiobutton field to select the color).  Note that single category views are used to limit/select ROWS not COLUMNS from your data and design.

Choice 'B' will allow your form to intelligently select a different view for each of your RadioButton values.  If your RadioButton field has 12 values then your design will require 12 different views appropriately corresponding to those 12 values.

To create the conditionally embedded view:
1. Remove your existing embedded view
2. From the menu bar: Create> Embedded Element> View
3. In the resulting View dialog, check the box for 'Choose view based on formula' and click [ok]
4. In the programmer's pane find the Embedded View's 'Embedded Selection' and enter a formula referencing your radiobutton.

@if(radiobutton!="";radiobutton;"name of a default view")

The values of the radiobutton should match either view NAMES or view ALIASES found in the design of the same database.

Personally, I think that approach 'B' will never meet the "best practices" guidelines -- but if you are certain your application calls for this approach then give it a spin!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.