Link to home
Start Free TrialLog in
Avatar of fledav01
fledav01

asked on

Obtaining a field value from a selected document in an embedded view

I have a form called category that contains a single field for a category value.

I have a category view that uses the category form and shows the category field value in the first column ascending.

I have an Product form that contains a field to hold the category value along with additional information about the product. The category view is embedded on this form.

I want to be able to single click the embedded category view and obtain the category field value of the document selected to modify a value on the Product form.  I looked at embedded editors but they change the value of the form used in the link and I don’t know how to get a handle on the Product form from the embedded category form.

I know (without embedding anything) I could use:

choice:=@UpperCase(@PickList( [Custom] : [Single] ; @DbName ; "Categories" ; "Select a category" ; "Please select a category for this new Item Master Entry" ; 1 ));

FIELD ProductCategory := choice;
@True

But I want to avoid using picklist popups and input boxes to gather the information.

Thank you in advance for your help
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

My guess: impossible. But I can't quite visualize what your goal is. Single clicking something ans still updating a Product? Usually, you open a Product document and you select a category. What's the general idea?
R6 ?  Then you can show the action bar in your embedded view (I think - must check - too lazy right now).

You can try anyway to put the action on the Form that holds the view

What will work for sure (again, R6 only) is to make your embedded view and Editable view (because I'm using that myself).   Let us know if you use R6, then I'll post an example.

cheers,

Tom

Avatar of fledav01
fledav01

ASKER

Thank you for the responses so far.  Yes I am using R6 and the app is for the client.

Perhaps it would be clearer if I explained it this way.  In VB you can dxrag a datasource control to the form and then map the column values to fields on the same form.  When the app is run clicking on an item in the datasource control updates the fields on the form.  Is that clearer?

Thanks again for your help so far.

Dave
Use a listbox field, not an embedded view.  Your Choices formula will be

@dbcolumn("";"";"Categories";1)

That's all!
By the way, the ProductCategory field will be the field you turn into a listbox.

See - it's easier than VB.
I accomplished it with frames - put the form in one frame and specified that as the target for links from the frame that contains the embedded view.  Thanks for all the input.  Can I give myself the points?
ASKER CERTIFIED SOLUTION
Avatar of CetusMOD
CetusMOD
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial