Lookup fields to be filtered on choice

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
User avatar
urichard
Veteran Member
Posts: 87
Joined: 2018-11-01 12:11

Lookup fields to be filtered on choice

Post by urichard » 2022-11-27 13:29

Hi,

This is what I want to do: To have a lookup field that already has items in from another table (table "A" submitted by myself) that a company can then choose and modify it with the options of weight and then have all the submitted weight stored in this table (table "B")

My question is this: is it possible to have another table "C" with lookup fields of all these items in table "B" but the items must be filtered according to the company that submitted their "weight" for these items and only these companies items be brought up according to their specific weight for each item, so not one companies weight for the items will be the same unless the companies really have the same weight when submitting on table "B". Then the selection that will be made here by the public will be stored in this table "C" according to their choice of item weight related to their company choice.

I hope this is understandable and possible with Appgini?

Thanks for the assistance.

Kind Regards,
Richard
[email protected][/color]

Kind Regards
Richard

User avatar
urichard
Veteran Member
Posts: 87
Joined: 2018-11-01 12:11

Re: Lookup fields to be filtered on choice

Post by urichard » 2022-12-06 18:30

Anyone please?
[email protected][/color]

Kind Regards
Richard

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Lookup fields to be filtered on choice

Post by jsetzer » 2022-12-06 18:43

Don't know for sure if I got your use case.

Table A
* id
* ...

Table B
* id
* a_id as lookup to Table A
* ...

I think in Table C you will need both, lookup to Table A and lookup to Table B, filtered, inheriting access permissons:

Table C
* id
* a_id as lookup to Table A
* b_id as lookup to Table B, Filter by: [x] a_id, [x] inherit access permissions
* ...

Then modify the permissions:
Grant VIEW on Table B for owner or for group, depending on your needs.
Kind regards,
<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 readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
urichard
Veteran Member
Posts: 87
Joined: 2018-11-01 12:11

Re: Lookup fields to be filtered on choice

Post by urichard » 2022-12-10 13:31

Hi Jsetzer,

Let me just give an example with the Nortwind app as an example:
1. When the create a new order button is pressed to then choose customer and click save the customer then->
2. Lets say each customer have already pre chosen their list of "favorites" from all the products that me (nothwind) offers for example I have 12000 products but the customers only chose 100 products (having their own list created via login etc. prior to this in another table I assume)
3. But then after the save button is clicked for which customer is chosen it should then only populate the items that are pre listed by the customer, so an order for the customer can only be placed from these few pre enlisted 100 items?
4. And the customer should also have been opted in on what is their weekly etc budget so it will then create a MOQ for this customer and before the order on point 3 above can be submitted it should be less than the MOQ.

I'm sorry for the long explanation but this is what I'm struggling with to wrap my head around, so how will I be able to make this happen?

I saw there is a search field plugin to purchase but will I be able to modify the plugin to not have an option to filter but instead automatically filter it like in point 3 based on list of items mentioned in point 2?

Kind Regards,
Richard
[email protected][/color]

Kind Regards
Richard

Post Reply