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.

Select Cascade v4

Questions related to using nuBuilder Forte.
Locked
vanman
Posts: 54
Joined: Thu Mar 01, 2018 11:09 pm
Has thanked: 1 time

Select Cascade v4

Unread post by vanman »

Hi

Has the dropdown cascade changed between v3 and v4?

I am struggling to make it work

I have a dropdown project_id from project table and in project_item table I need to select all project items that refer to the previous dropdown on project_id, tra_project_id is in the project_item table..

Thanks for help

Paul
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: Select Cascade v4

Unread post by admin »

Welcome back mate,

If you use Lookups instead of Dropdowns there are 3 advantages...

1. A Lookup can handle a project list that keeps growing.
2. A Dropdown Object requires that everything in the list to be copied to the browser (from the server) everytime an Edit Form is displayed - not good for big lists.
3. Using a Lookup for project items allows you to create a list that can be filtered automatically once you have chosen your project - by using a Hash Cookie in the project items' SQL statement of the Lookup. eg.

Code: Select all

SELECT * FROM project_item WHERE ite_project_id = '#cus_project_id#'
This SQL is the SQL property of the Form used in the project items' Lookup.

https://wiki.nubuilder.cloud/ ... /Forms#SQL

https://wiki.nubuilder.cloud/ ... Custom_SQL

Paul, I hope this helps.

BTW if you still want to use Dropdowns, you can but it would require some tricky Javascript.


Steven
ARWEN
Posts: 79
Joined: Thu Nov 01, 2018 6:01 am

Re: Select Cascade v4

Unread post by ARWEN »

To use cascaded dropdowns, there is a good example that uses a PHP procedure

https://forums.nubuilder.cloud/viewtopic. ... ded#p15400
vanman
Posts: 54
Joined: Thu Mar 01, 2018 11:09 pm
Has thanked: 1 time

Re: Select Cascade v4

Unread post by vanman »

Thanks Steven
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: Select Cascade v4

Unread post by admin »

.
Locked