90 pts.
 How to insert multiple rows into embedded view from a subform?
I have a section that contains a subform ( containing 3 editable fields for the user ). Then I have an embedded view categorized having two actions: Add and Trash. What i want to do: After the user complete the 3 fields and then press Add, the first row in the embedded view will appear. ( This easy thing I did ). But then after the first click on Add, I want that all the 3 fields to be refreshed, all of them to have as their value: "". After, if the user wants to add another row into the embedded view (with different values), in my case it is overwrited on the 1st row. I want to be separate rows in order. I tried something with @Command(ViewRefreshFields) into the Add action code but I didn't make it to work. Please help, J. U.

Software/Hardware used:
ASKED: October 4, 2012  8:52 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. fcdinadn   90 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

So, when you click Add on the subform it creates a new doc and that new doc is what is displayed in the embedded view?  If that’s not how you’ve designed it, then you should explain how it works.

 2,700 pts.

 

Thanks for your response! I have a section which contains a subform. When I click Add, I want the 3 fields from the subform to appear in the embedded view. Also, if again I want to insert 3 new values, I want to do it on another row in the embedded view, in my case it is overwrited… Thanks

 90 pts.

 

“When I click Add, I want the 3 fields VALUES* from the subform to appear in the embedded view. “

 90 pts.

 

I think you are running an agent which picks up the first document in the embedded view and updates with the values what you enter in the subform.If my understanding is correct then you need to create a new document for corresponding entry in the subform.

 1,055 pts.

 

Thank you, shivasanjay, but i’m not using any agent. It is only a main form, which contains both the embedded view and the subform

 90 pts.

 

any help will be appreciate. thanks

 90 pts.

 

If you have an embedded view, then you likely have docs using a particular form that are selected to display in that view.  Your add button seems to be updating the existing doc.  You need to change the code for the add button to create a new doc using the relevant form, set the appropriate field values from the subform, save the doc, and possibly refresh the view.

 2,700 pts.