"is a part of" 2 tables - HELP

Hi everyone I have to solve an issue which I am having trouble to and I would like to see if any of you can help me sort this outโ€ฆ

I have a table โ€œFamiliasโ€ (families) which have a Ref Table โ€œElementos da Familiaโ€ (family members) which is a part of โ€œFamiliasโ€

I then have another table called โ€œDiligenciasโ€ (Diligence of services) that must refer for each family.
Nonetheless I need to relate to one or more โ€œElementos da Familiaโ€ (family members). As this table is already โ€œa part ofโ€ the table โ€œFamiliasโ€ (Family) how can I include several family members to the diligence row?

any ideas?

0 20 2,541
20 REPLIES 20

โ€œA table can only have one Ref column marked IsAPartOf (a row can only be a part of one other row).โ€

Thanx, I now this and how it works.
how does your post help solve my issue? did you read all my post?

In the relationship between โ€œDiligenciasโ€ and โ€œElementos da Familiaโ€ you would NOT use the โ€œIs part ofโ€ property.

Instead your column in the โ€œDiligenciasโ€ table would need to be defined as EnumList with a base type of โ€œRefโ€ and the source table set as โ€œElementos da Familiaโ€. This will allow you add one or more family members to a โ€œDiligenciasโ€ row.

NOTE: In an EnumList/Ref (also Enum/Ref) type column, in order to set the source table you MUST first save the column changes once you have set EnumList and base type as Ref. Itโ€™s an annoying bug where the source table property will not show until after an initial save.

This is something new, and I will definitely try this out!!!

I will let you know how it goes!!

John,

I tried doing exactly what you mentioned, at the beginning it seemed to work as for a minute I could list the elements inside the โ€œElementos da Familiaโ€ using the methodology you mentioned.

now I dont seem to be able to get it up and running againโ€ฆ Iโ€™ve tried several times even set up new tables and new app from scratch and it doesnโ€™t workโ€ฆ if some kind of bug is preventing this to list.

here are screenshots of the test app I created from scratch




Any thoughts?

For the โ€œID Elemento Familiaโ€ in the โ€œDiligenciasโ€ table, you need to tell it what values to show in the dropdown so youโ€™ll need to add to an expression to the Valid_If or Suggested Values properties.

If you want to be able to simply select values and not add new ones, place the below expression in the โ€œValid_Ifโ€ property. To be able to add new entries from the the dropdown list, youโ€™ll want to insert the expression in the โ€œSuggested Valuesโ€ property. In both cases the expression is the same.

SELECT(Elementos da Familia[ID Elemento Familia], true)

Or just:

Elementos da Familia[ID Elemento Familia]

without SELECT().

I Tried both your methods and the select method does not allow me to do a dependent dropdown that I need in this case, so I went with Steveโ€™s method

Elementos da Familia[ID Elemento Familia]

The problem is that is listing the โ€œID Elemento da Familiaโ€ code and not โ€œApelidoโ€ which is the practical column for the user.
So I went back to the Familia table and set the KEY to โ€œApelidoโ€ which is not optimal as it is not an UNIQUEID(), as:

Elementos da Familia[Apelido]

This way it brings the โ€œApelidoโ€ which is what I need to show.
If I go back to set the KEY to [ID Elemento Familia], how can I display the name instead of the actual code?
and how can I get rid of the โ€œDangerousโ€ signs?

there is probably no โ€œandresโ€ as a key value in your table, it canโ€™t ref to that string value

Thanx for your reply.

โ€œandresโ€ is the row of a column [Name] which has an [ID Elemento Familia] which is KEY

Did you use a dropdown or buttons?

itโ€™s set to AUTO

Hey @Luis_Gomes_Machado I hope youโ€™re doing well my friend!

Hey Grant, just message you on whatsapp

@Luis_Gomes_Machado FYI, I understand part of your confusion with the dropdown being blank. I didnโ€™t mention the below before because I was a little uncertain. But I just encountered a similar situation.

There are times when a column dropdown will automatically populate without the need of an explicit expression. Under other circumstances an expression is required to populate the desired dropdown values.

I have never investigated to understand when these two situations are expected. I have opened another post to get some clarity about this.

It doesnโ€™t. I was just pointing out that itโ€™s not possible to have more than one column in a table set to โ€˜Is Part Ofโ€™. I was trying to save you the trouble of attempting the impossible.

I think @WillowMobileSystems suggestion should work.

Thanx anyway man!!!

Thanx both Steve and John!

I was finally able to list them!
Nonetheless I encountered a problem.

any idea why the โ€œDangerousโ€ signs on the options?

Yes, you most likely changed the SELECT() to return the โ€œNomeโ€ column instead of the ID/Key column? REplace the โ€œNomeโ€ column with the ID column and youโ€™ll be good.

REF columns MUST use the key column of the table they are referencing. This is how the link, or reference, is created that allows you access the other columns from the referenced table.

For dropdown display names, Ref columns will automatically use the Label column. In your case the Label column is already set to โ€œNomeโ€ so it will automatically display that value in the dropdown for you in place of the ID value. In the data, the ID value will be stored.

I Tried both your methods and the select method does not allow me to do a dependent dropdown that I need in this case, so I went with Steveโ€™s method

Elementos da Familia[ID Elemento Familia]

The problem is that is listing the โ€œID Elemento da Familiaโ€ code and not โ€œApelidoโ€ which is the practical column for the user.
So I went back to the Familia table and set the KEY to โ€œApelidoโ€ which is not optimal as it is not an UNIQUEID(), as:

Elementos da Familia[Apelido]

This way it brings the โ€œApelidoโ€ which is what I need to show.
If I go back to set the KEY to [ID Elemento Familia], how can I display the name instead of the actual code?
and how can I get rid of the โ€œDangerousโ€ signs?

Top Labels in this Space