However it would be nice to have a concept in the path language that is similar to lists i.e. a variable that you can add things to as you go.
1 person likes this
B
Bashar Nassar
said
about 7 years ago
Thanks Martin!
I
Inactive VCC contacts
said
almost 7 years ago
Hello. I would like to know if anything have changed regarding the <List> object for script lang since the previous post?
B
Bashar Nassar
said
almost 7 years ago
Hello Jakub,
Based on my knowledge there is NO progress with this wish. However, could you please describe your use case, is it something similar to use case above or something else?
I'm trying to check if a list is empty. The thing is that.Countwill not work in my case since I'm trying to do a checkout onlocallist that exists only within the sandbox script body (I create the list using <AddItemToListUnique> )
B
Bashar Nassar
said
almost 7 years ago
Hi Jakub,
The concept of the list is quite old and limited. It has been introduced many years ago to support some use cases in Report.
So, my recommendation is to use a Variable instead of a list, then you can apply all the Path query methods e.g. Count.
Down you can see an example of how to convert from using a List to a Variable, then how to check if a variable is empty.
So, ".Count" is not available for a list, I interpret. Is this described anywhere in the user documentation and if not why? Any way to check by an <If> statement if the list is empty?
SystemWeaver Support
said
almost 4 years ago
Hi Mikael,
Yes, this is correct. <AddItemToList> and <ForEachItemInList> are tags in the Script Language. .Count is a method in our Path Language and cannot be used with these list tags. There is now a configuration example article to illustrate how to use <If> to see if a list is empty: Checking if a List is Empty
Bashar Nassar
I’m trying to add items into a list and then use the Path language to get the value of this list. For example,
Instead, I want to use the path language to get the value of the list, for example
Is that possible?
Today this is not possible.
However it would be nice to have a concept in the path language that is similar to lists i.e. a variable that you can add things to as you go.
- Oldest First
- Popular
- Newest First
Sorted by PopularSystemWeaver
Today this is not possible.
However it would be nice to have a concept in the path language that is similar to lists i.e. a variable that you can add things to as you go.
1 person likes this
Bashar Nassar
Thanks Martin!
Inactive VCC contacts
Hello. I would like to know if anything have changed regarding the <List> object for script lang since the previous post?
Bashar Nassar
Based on my knowledge there is NO progress with this wish.
However, could you please describe your use case, is it something similar to use case above or something else?
Inactive VCC contacts
Well, the issue is the same as here: https://support.systemweaver.se/support/discussions/topics/31000002052
I'm trying to check if a list is empty. The thing is that .Count will not work in my case since I'm trying to do a checkout on local list that exists only within the sandbox script body (I create the list using <AddItemToListUnique> )
Bashar Nassar
Hi Jakub,
The concept of the list is quite old and limited. It has been introduced many years ago to support some use cases in Report.
So, my recommendation is to use a Variable instead of a list, then you can apply all the Path query methods e.g. Count.
Down you can see an example of how to convert from using a List to a Variable, then how to check if a variable is empty.
Using a List example:
Convert the above example to use a Variable:
Then you can check if the variable is empty using .Count
or using =[]
Mikael Lagerman
So, ".Count" is not available for a list, I interpret. Is this described anywhere in the user documentation and if not why? Any way to check by an <If> statement if the list is empty?
SystemWeaver Support
Hi Mikael,
Yes, this is correct. <AddItemToList> and <ForEachItemInList> are tags in the Script Language. .Count is a method in our Path Language and cannot be used with these list tags. There is now a configuration example article to illustrate how to use <If> to see if a list is empty: Checking if a List is Empty
Best regards,
Systemite Support
-
Comparing two versions of a structure
-
Context and path language
-
Overview of meta model
-
Importing old data
-
Cannot find multiple version items
-
Accumulated bar chart
-
Cannot remove part - is referenced
-
View of non accessable data
-
Path: How to check if an attribute is empty?
See all 33 topics