How to insert multiple rows into embedded view from a subform?

90 pts.
Tags:
Lotus Notes
Views
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.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Stiletto
    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.
    5,035 pointsBadges:
    report
  • fcdinadn
    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 pointsBadges:
    report
  • fcdinadn
    "When I click Add, I want the 3 fields VALUES* from the subform to appear in the embedded view. "
    90 pointsBadges:
    report
  • shivasanjay
    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.
    3,195 pointsBadges:
    report
  • fcdinadn
    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 pointsBadges:
    report
  • fcdinadn
    any help will be appreciate. thanks
    90 pointsBadges:
    report
  • Stiletto
    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.
    5,035 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: