Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 954
  • Last Modified:

Dialog box & Open (uidoc) parent document - Value transfer.

Let us call :
dialog box as A
Opened document (edit mode) as B

I want to transfer the value from a dialog box A to document B as i keep on selecting values in A and click on a "Add" button in the dialog box (not the default OK button).
I want to keep seeing the values appended as being added from B.

This field where i am appending the values in B is a multi value field and i would like it SUMMARY property to be OFF to prevent it from blowing off with 64 k error.

Any ideas  or sample code would be appreciated?
0
navgup
Asked:
navgup
  • 8
  • 4
  • 4
  • +1
1 Solution
 
HemanthaKumarCommented:
Notes version ?

In R6, you can use RefreshParentNote method/command to refresh the values from dialog to host document. But Note the field value in dialog should be in the form B and the field should be a computed field.

~Hemanth
0
 
navgupAuthor Commented:
I m using 5.0.10. I think ws.refreshparentnote is also avl in R5. Does it work same or their is any difference ?
0
 
HemanthaKumarCommented:
Yes I was meant to say R5...No differences, they are same in both versions
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
navgupAuthor Commented:
i tried form B has the same fields the dialog box has and both sides they are computed but as soon as i click on "Add" button in the dialog box. The fields in the dialog box gets new values appended but the same is not getting appended to the form B.
 In the "Add Parts" button formula in the dialog box i m saying :

FIELD matlist := matlist : newmat;
FIELD batlist := batlist : newbat;
@Command([viewrefreshfields]);@command([refreshparentnote]);""

What am i doing wrong ?
0
 
HemanthaKumarCommented:
In the dialogbox call , enable newFields parameter
0
 
navgupAuthor Commented:
matlist is a common field and newmat is a new data entry field. i.e i m trying to append newmat to matlist every time the user clicks on add button.

If i enable newfields parameter on in the dialog box, will it not create newmat field in B ?
0
 
HemanthaKumarCommented:
yes that is what the intention is...

So what is the compute formula for fields on Form B then ?? If it is same as dialog then you have to pass the new fields to form B too
0
 
Sjef BosmanGroupware ConsultantCommented:
Do you want to update the B form on the screen while the dialogbox is open? No can do! After the dialogbox has closed you will have to do a Refresh. I could of course suggest to use a NotesTimer... but it might crash your Notes :)
0
 
navgupAuthor Commented:
Yes sjef_bosman, i want to update form B while dialog box is open.

Hemantha, in form B i have formulas as the same field name. For eg. field matlist has matlist, batlist has batlist in computed formula.

Are you sure we can do it that way ?
0
 
HemanthaKumarCommented:
Yes.. the command is supposed to do that without user intervention and control thru code.

After refreshparentnote...Use reloadwindow command
0
 
Sjef BosmanGroupware ConsultantCommented:
I'd say this is IMPOSSIBLE!

What you can do is: close the dialogbox, refresh and reopen it immediately afterwards.

If I'm wrong I'll buy a new hat and eat it.
0
 
qwaleteeCommented:
Sjef, give the hat to Hemantha, I think you are correct.
0
 
HemanthaKumarCommented:
The dialog does push the changes to form B, but is not visible as you are looking at the doc in memory before loading the dialog. This will be refreshed only when the control is given back to the form.... SO Sjef's workaround of closing and opening is the soln..

Sjef, I would prefer to wear the new hat rather than having it for lunch ;-)
0
 
Sjef BosmanGroupware ConsultantCommented:
Hemantha: you are allowed to bake your own Pizza Hat if you want to...
0
 
HemanthaKumarCommented:
I am pretty lazy..
0
 
qwaleteeCommented:
HemanthaKumar,
> I am pretty lazy..
I heard you were just plain lazy :)
0
 
HemanthaKumarCommented:
want it to be pretty, I like it that way
0
 
Sjef BosmanGroupware ConsultantCommented:
Then get a pretty hat and not a plain one :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 8
  • 4
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now