hi all
Another thing I am having a problem with. One of the Select2 fields (Item) in my table DV is not working. This is an issue, as the user has to select a Product using this field The Description field is an autofill, based on the user selection of Item. The Price and subtotal depend on this field to calculate - currently, the only way I have to populate this field is to import a CSV or go into phpmyadmin... which is not practical for my users!
The other Select2 fields in the same table work ok. I have taken 2 screenshots of the Appgini set up - siteid is working, Item is not working.
I have searched the forum and tried a few hints from other posts (e.g. K Krishnamoorthy and changing the width to 100%) but it has not solved the problem.
Does anyone have experience of this? I recall it happened to me around 6 years ago and regenerating the app solved the issue. But I have now regenerated the app 6 times over the last 3 days and it is still not working!! I have generated to a brand new folder, I have overwritten files, I have tried a lot of things. The issue was happening on another Select2 in another table - regenerating the table solved the issue with that table but this field is particular stubborn and refuses to show anything. It worked fine on my local xampp server, then I regenerated the app with a few changes, uploaded to a webserver and it has broken.
Any ideas or hints on how to fix or resolve this issue?
Select2 not showing in DV
Re: Select2 not showing in DV
Please check permissions on items table.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Select2 not showing in DV
Thank you Jan! Do you mean check the box "inherit access permissions"? I am logged in as admin, so I should be able to see this table anyway...
Re: Select2 not showing in DV
Sorry, if you are logged in as admin, this will not be the reason usually. In this case, forget about me recent post.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Select2 not showing in DV
What is the SQL for the lookup? I see that siteID is a varchar and item is an integer, so I suspect that item is a link to a record (primary key?) in the products table, while the siteID is the actual value. Not sure that matters at all, just looking at what is different between the two.
Re: Select2 not showing in DV
Hi pfrumkin
Thank you for looking! I checked ajax_combo.php to see what the sql for the lookup is. It is looking for an integer, the entry in ajax_combo.php is
I think this looks correct? As you can see from the screenshot, I have 3x Select2 fields in this table. One is a lookup from Sites, one is from Jobs and one is from Products. Both the Sites and Jobs Select2 fields work perfectly and are visible in the modal view. It is only the Item Select2 field that is not visible (and therefore not selectable).
For more information
I have another table, called KitItems. This table has the same Item field as JobItems (they are both lookups to the Products table) and the modal view for KitItems works perfectly. The entry in Ajax combo is the same as above.
So I checked the entries in the template DV files! These are the same too.
The only difference between the tables is that KitItems also has a supplier field and the Items field is filtered by the Supplier selection. Supplier was not necessary in the Job_Items table.
Does anyone have any other ideas of where I could check to see if there is any different between KitItems.Item and Job_Items.Item?
Thank you for any help or pointers you can give.
Thank you for looking! I checked ajax_combo.php to see what the sql for the lookup is. It is looking for an integer, the entry in ajax_combo.php is
Code: Select all
'Item' => array(
'parent_table' => 'Products',
'parent_pk_field' => 'id',
'parent_caption' => 'IF(CHAR_LENGTH(`Products`.`ProdCode`) || CHAR_LENGTH(`Products`.`Item`), CONCAT_WS(\'\', `Products`.`ProdCode`, \'>>\', `Products`.`Item`), \'\')',
'parent_from' => '`Products` LEFT JOIN `Suppliers` as Suppliers1 ON `Suppliers1`.`id`=`Products`.`Supplier` ',
'filterers' => array(),
'custom_query' => '',
'inherit_permissions' => true,
'list_type' => 0,
'not_null' => false
),
For more information
I have another table, called KitItems. This table has the same Item field as JobItems (they are both lookups to the Products table) and the modal view for KitItems works perfectly. The entry in Ajax combo is the same as above.
So I checked the entries in the template DV files! These are the same too.
The only difference between the tables is that KitItems also has a supplier field and the Items field is filtered by the Supplier selection. Supplier was not necessary in the Job_Items table.
Does anyone have any other ideas of where I could check to see if there is any different between KitItems.Item and Job_Items.Item?
Thank you for any help or pointers you can give.
Re: Select2 not showing in DV
Hi,
can you change once the datatype of the job_items.siteid to integer and test.
can you change once the datatype of the job_items.siteid to integer and test.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Select2 not showing in DV
Hi pbottcher
I will try that and report back.
I wanted to check first - the field type of the PK field (siteid) in the Sites table is a varchar field. Siteid is in the format @@@### ( for example ABC001). So the lookup works perfectly in the table Job_Items (and in the 6 other tables that use Sites.siteid as a lookup).
The field type of the PK field for the Products table is an integer. It works perfectly in another table I have that uses the same lookup (KitItems). It just doesn't work in this table Job_Items. Here are screenshots from both fields (Job_Items.Item and KitItems.Item)
I don't understand why Kit Items works but Job Items doesn't?
I will try that and report back.
I wanted to check first - the field type of the PK field (siteid) in the Sites table is a varchar field. Siteid is in the format @@@### ( for example ABC001). So the lookup works perfectly in the table Job_Items (and in the 6 other tables that use Sites.siteid as a lookup).
The field type of the PK field for the Products table is an integer. It works perfectly in another table I have that uses the same lookup (KitItems). It just doesn't work in this table Job_Items. Here are screenshots from both fields (Job_Items.Item and KitItems.Item)
I don't understand why Kit Items works but Job Items doesn't?
Re: Select2 not showing in DV
Thanks to the very kind assistance of pbottcher, I deleted and recreated the field. It now works perfectly! I must have copied it from another table at some point and it has an incorrect setup.
Deleting the field and recreating has fixed the issue.
Deleting the field and recreating has fixed the issue.