Uniface User Forum

 View Only
  • 1.  Access to entities définition without DICT in production

    Posted 12-14-2022 05:54

    Hello, 

    I want to communicate 2 forms with 2 entities in relation 1:n
    The goal is to filter the form EX_050 (right) according to the filter applied to the form EX_041 (left)



    To do this, I retrieve the information related to the entities in the DICT table through the following function.
    ------------------------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------------------

    However, I would like not to be linked to the DICT database which is a development database linked to the IDE.

    To recap, how can I find out the relationships between entities with the compiled resources, without the connection to the dict database.
    Thank you, 
    Maxime

    ------------------------------
    Maxime Chazalviel
    Rocket Forum Shared Account
    ------------------------------


  • 2.  RE: Access to entities définition without DICT in production

    ROCKETEER
    Posted 12-14-2022 06:24
    Hello Maxime,

    With the ProcScript function $relation you can find the related key field of the one-entity (if it exists). I guess it should be possible to get the required info by looping through the fields of the many-entity (e.g. using $entinfo and use the topic PAINTEDFIELDS) and check if the required one-entity field(s) can be found. This, of course, only works if the required fields are actually present (i.e. painted). But, I guess, you also could just paint the one-entity on the form with the many-entity (as outer) and then pass the profile of the one-entity (from the first form). In case the many-entity has relationships with different one-entities then this might be not straight forward.

    There might be other ways to achieve this and these are just my initial thoughts (without doing any real in-depth research).

    I hope this helps.

    Kind regards,

    ------------------------------
    Daniel Iseli
    Principal Technical Support Engineer
    Uniface Services
    Rocket Software, Switzerland
    ------------------------------