PDM cards for the same extensions saved in the same folder

Hello

I am in the process of creating a product/sub-family product/product tree

For each of the product, sub-family and product folders I have a sub-folder that allows me to group documentation related to this family, sub-family or product.
image

I would like to retrieve in auto in the file card of these documentations in two variables the info of the folders in which these files are saved

e.g. - I put a doc in the product family doc folder so I put the values of two variables 1 and 2 of this " product family" folder in two variables 5 and 6 of the doc card

: - I put a doc in the doc folder under product family so I put the values of two variables 2 and 3 of this " product subfamily " folder in two variables 5 and 6 of the doc map

: - I put a doc in the doc product folder so I put the values of two variables 3 and 4 of this " product " folder in two variables 5 and 6 of the doc card

I made a map that works well for the lowest level using the folder data map variables
image

The thing is that the mapping being different depending on whether product, sub-product family or product family, I would need three different maps in which I make a different mapping. So far so good...
But the problem is where to save these cards??
Indeed, in order for all the " product doc" folders to have a card, I have to save the pdm card in the head folder and it's the same for the other two cards.

So I end up with the top folder with three cards valid for all the folders which means that nothing will work
Is it possible to add conditions other than the extension for the application of a card?
or
Is it possible to add conditions to a map:
if variable X=A then variable Y =foo
if variable X=B then variable Y=tata

This would allow me to make a single map which, depending on whether it's a product, family or sub-family doc, applies a different mapping.

Hoping I have been clear, which would surprise me greatly//

Hello
I had a little trouble understanding but you can make a parameterized map that allows you to display or not fields depending on the filling of other fields.
This is done by adding command logics to the targeted field (you can just hide or gray it out).
After yes, a data can be driven by another variable via the input formulas if we know the values that will be populated.

Hello Cyril,

So what exactly does the command logic do when the field is hidden, it is still calculated or not?

Indeed, let's say that
if X=1 then I show field 2 below
Y=1
and I hide field 3 below
Y=2

and
if X=2 then I hide field 2 below
Y=1
and I show field 3 below
Y=2

Will the hidden field disrupt the operation of the unhidden field since both fields drive the value of the same variable Y?

As for the input formulas, it doesn't seem to me that it is possible to put an IF condition, but only to combine variable values

Yes, the field is still calculated (I use it for example to set values to 1 or 0 and the field is continuously hidden).
With input formulas, you can only do word processing, so no conditional.
The conditional is just obtained by the formula itself that allows you to make "aliases".
For example in our country:
%_Famille(Mechanical parts excluding sheet metal and plastics=I20,Sheet metal parts=I23,Castings=I21)%
This allows you to display in a field, I20 if the Family variable is equal to Mechanical parts excluding Sheet Metal and Plastic.
So we can get out of it if we know all the variants.
The line is easier to generate in Excel and so you can easily modify it if there are changes.

1 Like

Thank you for these clarifications.
I don't think it works in this case because if it's calculated even if it's hidden, the hidden field will contradict the unhidden one.

for aliases it won't work either because what I want to display is not a fixed value I20 , I23 etc but the value of a variable of the folder in which the file is stored

and the name of the variable in question depends on the type of folder
For a project documentation, we will take the value of the folder variable 1
For a documentation under product family we will take the value of the folder variable 2
For a product family documentation, we will take the value of the variable of folder 3

In this case, there is no other choice than to have a card in each folder with different variables.

1 Like

Well, I have found a solution to my problem.
In the end I created an initial state in my file flow " product documents, product family and product subfamily"
From this initial step I made three automatic transitions which, depending on path conditions, will put the value of this or that variable in another variable.

Thus, when archiving the file deposited in a product folder, var 1 = var 2
Thus, when archiving the file deposited in a product family folder, var 1 = var 3
Thus, when archiving the file deposited in a folder under product family, var 1 = var 4

var 2, var3, and var4 being equal to the var2, var3, and var4 of the folders in which these files are stored, respectively.

This gives me what I wanted, namely a single map for different nested folder levels but which behaves differently depending on the level considered via " if " conditions

Thank you for your help