Lookup Table Parent/Filter problem

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
ameisfine
User
Posts: 74

Lookup Table Parent/Filter problem

Post by ameisfine »

I use lookup table with Parent/Filter. I use grid add.
Filtering is working for the 1st grid, but then not working for 2nd grid and also cause 1st grid not working (Result blank)

Please help What codes I supposed to add? or any other tricks? Thank


arbei
User
Posts: 9286

Post by arbei »

Use F12 to check if there are any error returned in the console tab.

Then post it here.


ameisfine
User
Posts: 74

Post by ameisfine »

I did that and there is no error appears at the console.


mobhar
User
Posts: 11660

Post by mobhar »

Is this a Master/Multiple-Detail relationship?


ameisfine
User
Posts: 74

Post by ameisfine »

mobhar wrote:
Is this a Master/Multiple-Detail relationship?

Yes mobhar. This is sales + sales detail.
I have a sales_detail table which selling an item and the item has different prices. Once user has chosen an item, he can choose the prices (from another table) of the particular item. This dynamic selection is working fine for the first grid (prices list appears only of item selected), but not for the second grid (prices list blank)


mobhar
User
Posts: 11660

Post by mobhar »

ameisfine wrote:
This is sales + sales detail.

Are you sure this is a "Master/Multiple-Detail" and not "Master/Detail" relationship?

The main reason why I asked you a question about "Master/Multiple-Detail", because you mentioned "first grid" and "second grid" which means there are at least two detail tables so that there are two grids.


kirondedshem
User
Posts: 642

Post by kirondedshem »

  1. do all products have price lists available coz it might be that some dont, so try to test with products in different orders.
  2. try to fill the second grid or third grid before the first one and see what happens co it might be that you have some client side errors that are killing the page after the first call.
  3. check the lookup table or view you are using to ensure it picks the right values and performs as expected. also check force selection if not initially used.
  4. if you have any custom client side events or custom filter option in field settings then try to remove them so you can have a more cleaer picture.

ameisfine
User
Posts: 74

Post by ameisfine »

mobhar wrote:
ameisfine wrote:
This is sales + sales detail.

Are you sure this is a "Master/Multiple-Detail" and not
"Master/Detail" relationship?

The main reason why I asked you a question about "Master/Multiple-Detail",
because you mentioned "first grid" and "second grid" which means
there are at least two detail tables so that there are two grids.

Ups, sorry my bad explanation. This is Master/Detail NOT Master/Multiple-Detail.
First grid means the first row of grid add data. When I add grid data in first row is working fine, but 2nd, 3rd, .. is not working fine


ameisfine
User
Posts: 74

Post by ameisfine »

kirondedshem wrote:

  1. do all products have price lists available coz it might be that some
    dont, so try to test with products in different orders.

= Yes for sure they have prices, I tried different order of item and always good in the first row

  1. try to fill the second grid or third grid before the first one and see
    what happens co it might be that you have some client side errors that are
    killing the page after the first call.

= I tried fill the second row first, and result is blank. Seem this selection is only working in first row

  1. check the lookup table or view you are using to ensure it picks the
    right values and performs as expected. also check force selection if not
    initially used.

= Already. I use view table for the lookup. Force selection checked. All working fine is the first row.

  1. if you have any custom client side events or custom filter option in
    field settings then try to remove them so you can have a more cleaer
    picture.

= not check yet. But when I use add page (not grid add), the selection is always working fine


kirondedshem
User
Posts: 642

Post by kirondedshem »

= I tried fill the second row first, and result is blank. Seem this selection is only working in first row
I feel this is the real hint to the problem but i still cant understand why, lets take a short in the dark although you might have done this you can retry just to be sure.

  1. ensure you are using the latest version of phpmaker and up to date template just incase it was an old bug, update template if new one available.
  2. create views with structures similar to the tables which has the grid add fucntionality. We want a clean setup one we are sure of
    Then using this or these views, ONLY setup the field settings as previously setup neccessary to enable the lookup fnctionlaities WITH NO OTHER CUSTOMISED CODE OR CLIENT SIDE EVENTS ATTACHED. Ensure to get this working coz if its not working at first then that means something is not right or its some sort of bug.
    3.If you were using a text fields for auto complete try to use a select fields instead just to see what happens.

ameisfine
User
Posts: 74

Post by ameisfine »

I tried to create a new table_detail and it's working fine. I will investigate all my code then. will be report soon.
Thank for suggestion.


ameisfine
User
Posts: 74

Post by ameisfine »

SOLVED.

in Parent/Filter #1, I let Parent table blank and just fill Parent field and Filter field and everything is fine. All rows is able to be filled while prices filtering is working normal as well.
Before I fill completely, Parent table is filled with sales_detail, and it caused the problem

I dont really understand but it solved the problem :)
Thank you.


Post Reply