Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Reduce Lookup results
Reduce Lookup results
Hi
If I want to use a Lookup object and have the results reduce to show a subset. Is the only way to have different forms with WHERE clauses in the Browse screen?
I have categorys table that category_id, cat_code, cat_name, cat_attribute_id
cat_attribute_id is the parent category in the attribute table and the category stores category and sub category,
att_name from (cat_attribute_id) cat_name is like.
Project Management - Project Manager
Project Management - Contracts
Construction - Drainage
Construction - General
Payment Type - Debit
Payment Type - Refund
Project Financial - Variation
Project Financial - Initial Budget
When I want a lookup for payment type I only want to browse through those with a category of Payment Type.
Thanks for your assistance.
Paul
If I want to use a Lookup object and have the results reduce to show a subset. Is the only way to have different forms with WHERE clauses in the Browse screen?
I have categorys table that category_id, cat_code, cat_name, cat_attribute_id
cat_attribute_id is the parent category in the attribute table and the category stores category and sub category,
att_name from (cat_attribute_id) cat_name is like.
Project Management - Project Manager
Project Management - Contracts
Construction - Drainage
Construction - General
Payment Type - Debit
Payment Type - Refund
Project Financial - Variation
Project Financial - Initial Budget
When I want a lookup for payment type I only want to browse through those with a category of Payment Type.
Thanks for your assistance.
Paul
Re: Reduce Lookup results
Paul,
You can use a Hash Cookie in the SQL of the Form to filter what you need.
And you can set that value (hide) to a value before opening the Browse Form.
Steven
You can use a Hash Cookie in the SQL of the Form to filter what you need.
And you can set that value (hide) to a value before opening the Browse Form.
Steven
You do not have the required permissions to view the files attached to this post.
-
- Posts: 67
- Joined: Wed Jul 04, 2018 4:11 pm
- Location: France
Re: Reduce Lookup results
Hello,
I'm looking to filter on a 'lookup' and try your method with the hash code.
For this to work I have to reverse the elements of the code?!?
But I still manage to assign a value to my text box.
Is it possible to assign the value of a Lookup to my text area?
Thank's for your help.
I'm looking to filter on a 'lookup' and try your method with the hash code.
For this to work I have to reverse the elements of the code?!?
But I still manage to assign a value to my text box.
Is it possible to assign the value of a Lookup to my text area?
Thank's for your help.
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Reduce Lookup results
What do you mean by that?joecocs wrote: For this to work I have to reverse the elements of the code?!?
I would set the hash cookie with nuSetProperty()
eg.
Code: Select all
nuSetProperty("color","red")
Then use the hash cookie #color# in your SQL.
The lookup object has a PHP After Browse event. This runs after a lookup value is chosen.
Use nuSetFormValue() to set the value of your text area.
https://wiki.nubuilder.cloud/ ... tFormValue
-
- Posts: 67
- Joined: Wed Jul 04, 2018 4:11 pm
- Location: France
Re: Reduce Lookup results
Thank you,
My need is to retrieve the value from my 'lookup 1' and assign the value in a 'text area' which is in a sForm (run) object,
but I can't assign the value to this 'text area'.
I understand the principle, I got a little lost.The lookup object has a PHP After Browse event. This runs after a lookup value is chosen.
Use nuSetFormValue() to set the value of your text area.
https://wiki.nubuilder.cloud/ ... tFormValue
My need is to retrieve the value from my 'lookup 1' and assign the value in a 'text area' which is in a sForm (run) object,
but I can't assign the value to this 'text area'.
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: Reduce Lookup results
In After Browse:
-> Replace your_text_area with the Object ID of your text area
-> Replace your_value with the field name of the lookup table
Code: Select all
$lu = nuLookupRecord();
nuSetFormValue('your_text_area', $lu->your_value);
-> Replace your_text_area with the Object ID of your text area
-> Replace your_value with the field name of the lookup table
-
- Posts: 67
- Joined: Wed Jul 04, 2018 4:11 pm
- Location: France
Re: Reduce Lookup results
Thank you for your answer,
I tested but I couldn't because I had a relationship problem in my database.
I redid my base but I can't filter an iframe (run) from a cell of another iframe (run)
i explain:
In Form1-Tab1 i've an iframe1 (run) with recordsets (Tiers) in Browse & edit.
In Form1-Tab2 I've an iFrame2 (run) with recordsets (Contacts) in Browse & edit.
I would like to filter the iFrame2 with the Tiers_Id field contained in the iFrame1.
I looked in the wiki and and in your answer to understand but I can't.
if you have an idea i would be happy to help.
I tested but I couldn't because I had a relationship problem in my database.

I redid my base but I can't filter an iframe (run) from a cell of another iframe (run)

i explain:

In Form1-Tab1 i've an iframe1 (run) with recordsets (Tiers) in Browse & edit.
In Form1-Tab2 I've an iFrame2 (run) with recordsets (Contacts) in Browse & edit.
I would like to filter the iFrame2 with the Tiers_Id field contained in the iFrame1.

I looked in the wiki and and in your answer to understand but I can't.

if you have an idea i would be happy to help.
