Author Topic: Issues while detecting elements in views  (Read 436 times)

lucasmrq

  • Member
  • **
  • Posts: 10
Re: Issues while detecting elements in views
« Reply #15 on: July 01, 2021, 13:32:48 PM »
Thanks a lot for this code skeleton, I was able to create a first script that seems to work.

lucasmrq

  • Member
  • **
  • Posts: 10
Re: Issues while detecting elements in views
« Reply #16 on: July 02, 2021, 08:46:12 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 695
  • Archi Evangelist and Contributor. Visionary.
    • About me...
Re: Issues while detecting elements in views
« Reply #17 on: July 02, 2021, 10:18:34 AM »
Hi,

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')

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! https://www.archimatetool.com/donate

lucasmrq

  • Member
  • **
  • Posts: 10
Re: Issues while detecting elements in views
« Reply #18 on: July 06, 2021, 09:37:38 AM »
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