I’m trying to pull information from one of my view’s into a combobox, and I succeded with this command…@DbColumn(“Notes”:“NoCache”;“”;“Quantities”;1)
Now I’m trying to get my field1 to get specific data off of the pull down menu. So if the user pulls down a specific entry, the field will auto populate with a certain field in that data.
Example:: A user pulls down the product labled “cleaning supplies” Then I want a specific field (field1) to autopopulate with information like the quantity we have to date.
I have tried this command,
@If(Pull=Null;Null;@DbLookup(“Notes”:“NoCache”;“”;“Quantities”;Quantity;4))
But this only brings up “;;” if I am lucky… Am I going about this all wrong? Maybe I am using the wrong command?
Thanks for your help!!
-David
Subject: RE: Help with @dbcolumn
First, this is probbaly not why you’re having a problem, but Null is not a reserved word in macro language. It’s a field name, and if you happen to have a field named Null on your form it would return that value. Please tell me who taught you to do this, because I want to punish them. Use “” instead.
I see you referred to the field containing the key value as “Pull” in one part of your formula and “Quantity” in another. Which is correct?
Make sure the keyword field is set to refresh fields on keyword change.
Since your @DbLookup is not returning an error, perhaps it is working (i.e. the key search is successful), but column 4 of the view doesn’t contain the information you want. Are you sure you counted columns correctly? @DbLookup doesn’t count columns the same way that you might. Read the Domino Designer help.
Subject: RE: Help with @dbcolumn
Thank you for the imput about null, it didn’t solve this problem, but it did solve another one that I was having
I found the example of using null in a book, (guess that show’s how much it’s worth)
I changed the field properties of my combobox to refresh fields automatically, and that has helped narrow down the problem.
I’m starting to worry that I am not doing this the way I should be. All I am trying to do is grab all of the info in my Quantity view using a pulldown menu, then have my fields autopopulate with the specific information contained in that selection.
So if I select item # 38292, it will autopopulate field1 with the name, field2 with the quantity to date, and field3 with it’s location.
Currently I have my combobox containing
@DbColumn(“Notes”:“NoCache”;“”;“Quantities”;1)
(which is working)
But I am unsure what to put in my field so that it will automatically get the information relevant to the selection in the combobox…
–David
Subject: Then assuming that Field1 is Computed (or Computed For Display) it should have…
this formula. Second assumption is that Field0 contains your drop down list. Third assumption is that View Column 2 contains the part name and that Column 3 has Quantity To Date and Column 4 has Location:Field1:
@DbLookup(“Notes”:“NoCache”;“”;“Quantities”; Field0; 2; [FAILSILENT])
Field2:
@DbLookup(“Notes”:“NoCache”;“”;“Quantities”; Field0; 3; [FAILSILENT])
Field3
@DbLookup(“Notes”:“NoCache”;“”;“Quantities”; Field0; 4; [FAILSILENT])
Subject: RE: Then assuming that Field1 is Computed (or Computed For Display) it should have…
I couldn’t get that to work, so I created a new form with just a combobox, (field0) and a field labled field1
I put in this formula in field0
@DbColumn(“Notes”:“NoCache”;“”;“Quantities”)
And set it to refresh automatically
and put this in field1
@DbLookup(“Notes”:“NoCache”;“”;“Quantities”; “Field0”; 3)
I left the [failsilent] off for now so I can view the error, and 3 is representing quantity to date.
When I save and preview, I get the message
“ERROR: Entry not found in index or view’s index is not built”
I have tried changing the 3 to 1,2,4 and 5 and recive the same error.
Thank you for all of your help!
Subject: Make sure that the View “Quantities” is sorted by the First Column
and that your @DbLookup is exactly like this (note take out the “”'s around the Field0)@DbLookup(“Notes”:“NoCache”;“”;“Quantities”; Field0; 3)
Subject: RE: Make sure that the View “Quantities” is sorted by the First Column
I took out the quotations, and made sure it is being sorted correctly, but im still getting the error “ERROR: Entry not found in index or view’s index is not built”
Subject: You will get that until you pick something in Field0 or default value Field0 to something
that exists in the view. That is why I had the [FAILSILENT] in the first place.
Subject: RE: You will get that until you pick something in Field0 or default value Field0 to something
Even when I select something from the dropdown menu, nothing occurs, and when I remove the [failsent] the error is shown. Could I not have some other value set up correctly?
Subject: RE: You will get that until you pick something in Field0 or default value Field0 to something
You’ll need to set the property “Refresh fields on keyword change” on your “driving” field, and “Refresh choiced on document refresh” on any keyword fields that derive their choice list from that field.
Subject: RE: You will get that until you pick something in Field0 or default value Field0 to something
They are, let me make sure I know what everything is supposed to be pointing to.
@DbLookup(“Notes”:“NoCache”;“”;“Quantities”; Field0; 2; [FAILSILENT])
I understand everything up to quantities, and those are of course working. Quantities is pointing to my view labled “Quantities” and field0 is pointing to my field0 in my form.
This is all correct right?
Subject: RE: You will get that until you pick something in Field0 or default value Field0 to something
Yep. Is the view sorted (categorised or standard doesn’t matter, but you need to select ascending or descending as opposed to “none”)? If you remove the [FailSilent] keyword, what error message are you receiving (now, not before)? You can replace the “Notes”:“NoCache” parameter list with a simple “”, BTW.
Subject: RE: You will get that until you pick something in Field0 or default value Field0 to something
I switched it to ascending, and removed [failsilent] but I’m still receiving the same error
“ERROR: Entry not found in index or view’s index is not built”
Subject: RE: You will get that until you pick something in Field0 or default value Field0 to something
Are you sure that the value appears in the view exactly as it appears in the field?
Subject: Help with @dbcolumn
Hi,
does your view is sorted on the first column ?
does your key (Quantity field) is also the data represented with the first column in the view Quantities ?
Dave