Subject Re: [IBO] Lookup Combo
Author Jason Wharton
Andy,

Essentially what you asking to have happen is when a change is made higher
up that causes lower settings to become invalid that they should be set to
NULL? What happens if the change at the master level is cancelled? How will
the others know to cancel their changes? What if there were changes from
another source? How would I know to cancel? I think it would be too much
work for me to accommodate your fairly complex situation in a simple manner.

I might be missing something...

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Andy Samuel" <andysamuel@...>
To: <IBObjects@egroups.com>
Sent: Thursday, January 18, 2001 10:25 PM
Subject: RE: [IBO] Lookup Combo


> Jason and others
>
> Before going any deeper, please note that I don't say that IBO has bugs or
> something.
> It's just that I fail to produce what I want to achieve.
>
> Let's take a look at the "Company" sample in the IBO.
> The "Company" sample uses 1 database, while my case has 2 databases.
> Let's extend the "Company" example a little bit.
>
> Add 3 fields at "CurrentCompany" table : CountryId, StateId, CityId.
> Now, you can easily figure out the relationship.
> There supposed to be 3 others table, they are COuntry, State, City.
> BUT these 3 tables not in the same database, so...create another database
> MASTER.GDB and put these 3 tables in it.
>
> Country table has primary key build upon the "Id" field.
> State table has primary key build upon the "CountryId" and "Id" field;
> City table has primary key build upon the "CountryId", "StateId" and "Id"
> field.
>
> Let's fill the Country table with :
> Id Descr
> -- -----
> USA United States of America
> SIN Singapore
>
> Fill the State table with :
> CountryId Id Descr
> --------- --- -----
> USA TX Texas
> USA CA California
> SIN SIN Singapore
>
> Fill the City table with
> CountryId StateId Id Descr
> --------- ------- --- -----
> USA TX TX Texas
> USA CA CA California
> USA CA SO Someother city in CA
> SIN SIN SIN Singapore.
>
>
> Now, the master table would be "CurrentCompany" in CONTACT database, and
the
> Lookup dataset would be "Country", "State", "City" in MASTER database.
>
> Now I put 3 Lookup combos to let user choose a company's country, state
and
> city.
>
> Let's say the "First Company" in the "CurrectCompany" table has CountryId,
> StateId, CityId of : USA, TX, TX.
>
> If correctly configure the 3 lookup combos, it should display the correct
> lookup records, regardless whichever fields you choose to be displayed.
>
> Now, through the lookup combos, change the First Company's country to
> Singapore instead of USA.
> The other 2 lookup combos ( State and City ) should goes blank, which is
> correct.
> If we commit the data at this point, the actual 3 fields would have these
> values : SIN, TX, TX, which is totally wrong. How to set IBO properties
to
> property handle this case. ( Yes, I can do it programmatically ( before
post
> / commit ), but I'm asking if there's a way to just setup some fields in
IBO
> so solve this ).
>
> Further more, if I try to change the state, it displays all states. I
want
> to display only available states in SIN country. The question still the
> same, how to solve this through proper IBO setup, not programmatically.
>
> The reason I'm asking this is because ... yesterday I purchased Getting
> Started Guide and surprised to read how easy to setup IBO and what I have
> missed ( if I did not read GSG to start using IBO for the first time ).
> Great works Jason ( and all the contributors ) !.
> So is there any "easy way" ? :)
>
> Have fun !
> Warm regards
> Andy
>
>
>
>
> > -----Original Message-----
> > From: Jason Wharton [mailto:jwharton@...]
> > Sent: Friday, January 19, 2001 7:07 AM
> > To: IBObjects@egroups.com
> > Subject: Re: [IBO] Lookup Combo
> >
> >
> > Please examine the Company sample application that mixes together the
> > master-detail and keylinks relationships. If you can tell me how to
> > duplicate your undesirable behaviors in this context there is probably
> > something I can do to address them.
> >
> > This one sounds pretty hard to do so I am going to need a
> > sample of some
> > kind to play with.
> >
> > Thanks,
> > Jason Wharton
> > CPS - Mesa AZ
> > http://www.ibobjects.com
> >
> >
>
>
>
>
>