0 votes


I have split the PRODUCTS table in two entities and now I have a problem with their favorites :
- Products are records with FAMILY <> 1 (KENTITY=30)
- Missions are records with FAMILY = 1 (K
Both have KTABLE=30000 in SYSENTITIES

The favorites grid displays the same records for Products and Missions.
enter image description here

With the post of Kristof Pauwels I know that they are stored in the FAVORITES table.
I suppose that Efficy look the K_TABLE to know the Entity and it's why there are all Products

What can I customize to apply a filter ? I search but I can't find a Query.
enter image description here

The grid
enter image description here

using Efficy 10.2

related to an answer for: Recents and favorite troubleshoot
asked in How to by (259 points)
edited by

1 Answer

0 votes

If you need to isolate the data even up to the level of favorites, then it looks like you made the wrong decision to use PRODUCTS as a multipurpose entity. Inserting a separated entity for missions would have been more appropriate.

The <%GetFavoriteGrid()%> doesn't support custom filtering

answered by (7.4k points)
I did this to be able view both Missions and Products in the products grid in TabContentProd in DocuEdit and OppoEdit using a single GetRelationGrid (entity=Prod). All the relation between Docu/Oppo and Missions&Products are stored in DOCU_PROD and PROD_OPPO.
In the SYS_TABLEVIEWS "DOCU_PROD" and "PROD_OPPO" I don't put a filter on FAMILY, but I use FAMILY in GridEditColumnsCustom.txt to set css classes and input display (I added a screenshot of the grid in my Post)

If I create Mission as a full entity with its tables I don't think I can do a grid like this.
I tried customize macros like this :
1) in TabContentsProds, call GetRelationGrid( Miss ) with a template text. The Template text contains
-> a <#repeat> </repeat> that contains 2 rows:
-> the first one = Miss inputs (Name, ...)
-> the second one = GetRelationGrid(Prod) with columns  but I don't know how to display products of "this" Mission. DOCU_PROD and PROD_OPPO have a "F_LOT" field that store the Mission key.
So I have 3 "problems" :
- for GetRelationGrid(Miss) Is it possible to filter GetRelationGrid on F_LOT ?
- If you use a query or a templateText with GetRelationGrid, some grid tags like <#a> and <#G> will not work anymore
- GetRelationGrid(Prod) : is it possible to use a "filter" like filter="F_LOT=<#K_PRODUCT>" ?
You can apply a filter to a GetRelationGrid tag, because it's an inherited version of GetDataGrid. You could however introduce new issues. I can't give you solid advice, since I only see a isolated part of the functional specification.

I can also remind you about the https://help.efficy.com/edn/dev/bdnt_11_quotationbuilder feature, this allows you to make more custom quotations. It could maybe help as a more native solution
I will try with the filter.

I just take a look in the URL : yes I think that this can be really helpfull to me for this client (Missions will be fragments), but the problem is that I work in Efficy 10.2 but my manager don't want to upgrade this db until the customer don't validate the model
BUT the customer want to have a panel/summary for these mission, be able to link them to others entity (Companies, Contacts, Actions, Users) is it possible with these Fragments in Efficy 11 ?
I haven't worked with fragments before. What I do know is that the entity "Frag" is not a normal entity. It lacks the typical tableviews (Consult, Edit, Delete) so you can forget an easy usage in other entities.
I see..
You see the "+" button on the right of the Mission ? I want this button open he Search window to add a product, so I use the AddRelationButton(Prod) and call a custom function addProductToMission() which receive the mission key in param (missKey)
This function call the Search window and the Search window can link the selected product to the document, but I have to set F_LOT=missKey for this relation.
This function can call a server script with the EditHandle and the MissKey, but is there a way to retrieve the relation ? I can Use PositionDetail but I need the K_RELATION..
If I trigger OnInsertDetailOppoProd, the workflow will not be able to get missKey
Hi again,
Can you have a look here :

I have an idea about how to do what I want, but I need some advice and tips before do it
P.S : in this question I speak about Missions (Batches) as a full entity with its own tables
Welcome to Efficy Overflow, where you can ask questions and receive answers from other members of the community.
1,248 questions
1,518 answers
328 users