Subject Re: Conditional data in combo picklist
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Tue, 4 Jan 2022 19:53:45 +0530
Newsgroups dbase.getting-started

Good Evening Milind,

> Scenerio : In a grid form one of the column value  is from  combo. Picklist of this combo  is from another database say B. Need picklist with  condition say Status = 'WIP' . (Status is a field in the database B)
>
> In form tried to give syntax
>   sql = 'select * from B.DBF where status = :m_status'
>
> m_status is avariable which is passed as a parameter.
>
> currently m_status is initialised in form_onOpen

If you want data to be changed whenever a combobox is changed then you
will have to opt in for onChangeCommitted event handler of the combobox.

If this combo is part of Grid and you want Grid 2 to change with every
change in this combobox then I will suggest that you have a look at the
mastersource property of query.

Any navigation in Grid 1 will automatically result in fresh data in Grid 2

I did start using mastersource as a property in Grid but that project
never took off so do not remember much details.

If required will develop a sample test form.

Regards
Akshat