Issues while detecting elements in views

Started by lucasmrq, June 23, 2021, 19:49:04 PM

Previous topic - Next topic

lucasmrq

Thanks a lot for this code skeleton, I was able to create a first script that seems to work.

lucasmrq

I've got one other question about folders. Is it possible to detect the folders of a concept ? I'm trying now to store every elements and relations into folders with their name. I want to be able to do it again when new elements are placed that is why I must detect if elements are already store or not.

Jean-Baptiste Sarrodie

Hi,

Quote from: lucasmrq on July 02, 2021, 08:46:12 AM
Is it possible to detect the folders of a concept ?

Create a collection containing your element and use parent() with a filter: $(element).parent('folder')

Quote from: lucasmrq on July 02, 2021, 08:46:12 AM
I'm trying now to store every elements and relations into folders with their name. I want to be able to do it again when new elements are placed that is why I must detect if elements are already store or not.

Personnaly I would use the "brute force" approach which is more efficient: always move the element in the right folder, without first checking if it was needed.

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

lucasmrq

The brut approach is more efficient. Thank's a lot for help on that project. I have started an other subject because it is an other question.
Lucas