Solved

Update a field based on the value of another one on the web

Posted on 2002-06-11
20
256 Views
Last Modified: 2013-12-18
Hi lotus masters, it's at least 3 years that i ask your help here and you've never failed me ;-) and what is incredible it's usually the same persons who answer me. What do you win guys?
Ok, here's the question :
My mask displayed on the web has a field A where the user can choose a name. As soon as the name is chosen i want to update another field that, if i was using the mask in notes client should contain :

userID:=@If(A!="";@Subset(@DbLookup("" : "NoCache";"" : "names.nsf";"($Users)";A;"FullName");-1);"");

temp:=@If(userID!="";@DbLookup("" : "NoCache";"";"AdminVwOrganigramme";userID;5 );"");

@If(@IsError(temp);"Unknown";temp)

Do you have any idea to do this except a button?

Thx,
Koray.
0
Comment
Question by:koray_uygun
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
  • 3
  • +2
20 Comments
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7069344
Hobout refresh fields on keyword change option in the Form properties ????
0
 

Author Comment

by:koray_uygun
ID: 7069350
Impossible, field A has a button next to him that opens a dialogbox where to choose a name from NAB and the dgbox fills the field A.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7069351
All that is needed is to refresh the page after you set the field "A"  use javascript i think i have it somewhere let me find it for you hang on.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:koray_uygun
ID: 7069359
Field B is not a computed field, users must be able to enter other persons.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7069390
oh both are open fields is it ???
0
 

Author Comment

by:koray_uygun
ID: 7069414
yes
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7069482
Hm, interesting. The dialog box fills the name from address book.
How is this done?
1) By passing the value to the opener window using Javascript?
2) By updating the referenced document from script in an agent that then reopens the document?
If the last one is the case, you could in the same agent do your lookup and add the value to field B I guess.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7069547
Hello Koray,

may I repeat your request...

You have two fields: A and B
As soon as field A get a value you would like to preset field B
When field A changes its value should field B be preset again with corresponding value.
Important! As soon as field B is changed by user no value preset is allowed any more for this field.

Are this assumptions correct?

PS: refreshing the form onChange of a text field on web is not a problem for an Wiz <|;-)

0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7069614
It's also no problem for a whiz kid :-)
0
 

Author Comment

by:koray_uygun
ID: 7069703
Hi, thanks for being interested in my problem.
Jerrith, the answer is 1)
Zvonko, you're right on understanding my request. Refreshing the doc is not a solution i think as soon as B is not a computed field.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7071253
My question did not contain any proposal :-)

And now that my assumptions are settled here my proposal packed in a question...
Should I write a @formula for you to do this field B presets?

I have done this in my application this way:
1.) The field A got an onChange JavaScript function to refresh the page.
2.) The InputValidation formula for field A checked whether its value changed; if not then do nothing
3.) The InputValidation formula for field A checked whether field B value is empty; If yes then preset with new proposal and save the proposal in a hidden field.
4.) If field B value is not empty and is equal to saved hidden field then preset field B with new proposal.
5.) Field B value is not empty and not equal to last saved preset value; that mean field B is edited by user and may not to be changed.

This checkings sound complicated in English words but are easy to implement in @Formulas. Should I give you an example?

0
 
LVL 10

Accepted Solution

by:
zvonko earned 100 total points
ID: 7073160
Hello Koray,

here the description how to do...

Create a subform; name it: Refresh
On the subform place only a single button with this formula:
@Command([ViewRefreshFields])

Insert this subform at first position into your form containing fields A and B. Invoke this form in browser. Look into source code. You will see the onClick code for the button:
<INPUT TYPE=button VALUE="" onClick="return _doClick('0632011ff04998e1c1256bd60050792c/$Body/0.68', this, null)"

Remove the subform from the main form but insert the JavaScript code from onClick into onChange event of the field A, like this:
return _doClick('0632011ff04998e1c1256bd60050792c/$Body/0.68', this, null)

Place on the main form also two additional fields with names: svdA and svdB
Into HtmlAttributes of both fields place this string:
"type=hidden"

Into InputTranslation formula for the field A place this:
FIELD A:=A;
FIELD B:=B;
FIELD svdA:=svdA;
FIELD svdB:=svdB;
@If((A=svdA)|(B!=svdB);@Return(A);"");
@SetField("svdA";A);
userID:=@If(A!="";@Subset(@NameLookup("[EXHAUSTIVE]";A;"FullName");-1);"");
temp:=@If(userID!="";@DbLookup("";"":"";"AdminVwOrganigramme";userID;5);"");
orgNam:=@If(@IsError(temp);"Unknown";@Implode(temp));
@SetField("B";orgNam);
@SetField("svdB";orgNam);
@Return(A)

Tell me how it works for you.

So long,
zvonko

0
 
LVL 10

Expert Comment

by:zvonko
ID: 7099434
Hello Koray,

do you need help?


0
 

Author Comment

by:koray_uygun
ID: 7100115
Thanks Zvonko, i'll try it next wednesday and tell you...:-)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7100265
Ok, thanks.

So long,
zvonko

0
 

Author Comment

by:koray_uygun
ID: 7111146
Sorry, i haven't found the time yet do check the solution, i have more urgent bugs to correct for now ;-). I'll do it as soon as i find a moment.
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7112295
No problem, take your time :)

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 11250300
koray_uygun,
No comment has been added to this question in more than 711 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

RECOMMENDATION: Award points to zvonko http:#7073160

Any objections should be posted here in the next  4  days. After that time, the question will be closed.

Thanks,
Zvonko
EE Cleanup Volunteer
0
 

Author Comment

by:koray_uygun
ID: 11257476
Sorry for the delay, I didn't even remember this question now ;-)
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 11257926
Thank you for closing this one.
Please have also a look for this old one: http:Q_20823630.html

Either grant points to qwaletee or ask for points refund at http://www.experts-exchange.com/Community_Support/

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question