?
Solved

dblookup problem

Posted on 2003-02-25
3
Medium Priority
?
251 Views
Last Modified: 2013-12-18
I have a formula:
@If(CMref_pkg_id = "";CMpkg_desc;
@IsError(@DbLookup("";"";"CMxref";CMref_pkg_id ;"CMpkg_desc")); CMpkg_desc; @DbLookup("";"";"CMxref"; CMref_pkg_id ;"CMpkg_desc"))
This formula checks for a reference field that executes a lookup to extract thedescription froma previous document.  The problem is when the reference is used, the description is generating from the previous document, however I cannot add to the description field in this document.  I would like to be abble to use the previous description as the default but be able to add or change it.  When I do with this formula, it allows the added changes to this field, but then reverts back to the original desc value from te previous document.
????
:)
Paul
0
Comment
Question by:pratigan
[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
3 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 8018104
Try this

Eg:

@If(CMref_pkg_id = "";@Return(CMpkg_desc);"")
@if(@trim(CMpkg_desc) = ""; @Return(CMpkg_desc); "");
lookupval := @DbLookup("";"";"CMxref";CMref_pkg_id ;"CMpkg_desc");
@if( @IsError(lookupval); CMpkg_desc; lookupVal);
""

~Hemanth
0
 
LVL 7

Accepted Solution

by:
scottrma earned 200 total points
ID: 8018144
Is this the formula for your CMpkg_desc field? If so, and if I have understood your requirement correctly, then try something like this:

temp := @DbLookup(""; ""; "CMxref"; CMref_pkg_id; "CMpkg_desc");

@If(CMpkg_desc != ""; CMpkg_desc; CMref_pkg_id = ""; CMpkg_desc; @IsError(temp); CMpkg_desc; temp)

Regards,

Scott
0
 
LVL 4

Author Comment

by:pratigan
ID: 8018826
Hello Hemanth,
I tested your logic and had an erro missing a ;, I added it  and no data auto generated.
Hello Scottrma,
Your logic worked as desired.  I appreciate both your efforst and rapid turnaround.  Your both valued resources.
Thank you both very much !!
Paul
<:-))
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

800 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