Solved

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

Posted on 2002-06-11
20
245 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
  • 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
 

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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now