A "Pull from List" activity overwrites array label fields when query to it includes "SELECT *"

A "Pull from List" activity overwrites array label fields when query to it includes "SELECT *"

takamatsu_keita
Enthusiast Enthusiast
128 Views
4 Replies
Message 1 of 5

A "Pull from List" activity overwrites array label fields when query to it includes "SELECT *"

takamatsu_keita
Enthusiast
Enthusiast

Hi,

a strange behavior which may be a bug was found. 

Could you check attatched model "20250826.fsm" and determine if it is a bug or not?

 

I found some label values of object was changed when processing "Pull from List" activity.

After instant research, it appears that there are following requirements to trigger this behavior:
1. query used in "Pull from List" activity includes "SELECT *"
2. pull target list includes fields storing array value
3. option "Assign SELECT Values to Puller Labels" is enabled on pull target list

 

In case of "20250826.fsm", each item stored to list1 has following 6 fields:

1. name: nonArrayLabel1, label value type: number, defined on list1: yes, dynamic: yes

2. name: nonArrayLabel2, label value type: string, defined on list1: yes, dynamic: no

3. name: arrayLabel1, label value type: Array, fixed array length: no, defined on list1: no

4. name: arrayLabel2, label value type: Array, fixed array length: no, defined on list1: yes, dynamic: yes

5. name: arrayLabel3, label value type: Array, fixed array length: yes, defined on list1: yes, dynamic: no

6. name: arrayLabel4, label value type: Array, fixed array length: yes, defined on list1: no

 

After processing "pull from list1" activity on it, following labels of first pulled object were changed: arrayLabel2, arrayLabel3.

It appears that this behavior happens regardless of whether if the array field is dynamic or not, or whether if the array length is fixed or not.

 

Thank you.

0 Likes
Accepted solutions (2)
129 Views
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

Maybe you have observed a special behavior of arrays in general. An array is an object which has got an address in memory.. if you change it, then this will update all referenced arrays in your model. If you want to prevent this behavior, you must make a deep copy of your array and assign a new name to it. 

0 Likes
Message 3 of 5

takamatsu_keita
Enthusiast
Enthusiast

Thank you for your reply, but I have one more question.

 

I understood that assigning array label to puller with SELECT query returns a shallow copy of it. I think that this behavior can be avoided by excluding array labels from SELECT target and creating them outside of "pull from list" activities: but it is only in case that target array fields can be gained as labels associated with value.

Could you tell me what I should do to avoid this behavior when I want to SELECT array fields which cannot be gained as value labels?

0 Likes
Message 4 of 5

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

This sounds to me like a new question. Probably it is solvable by an IN clause or a join over all values of an array to expand the list over all value variants representing one value in one row cell. If you evaluate an array as a simple datatype an array returns only its first element. Typically you get to each value of an array by a nested query . 

0 Likes
Message 5 of 5

takamatsu_keita
Enthusiast
Enthusiast

Thank you for additional reply.

It looks like that it will work by using "ARRAY_AGG" query in Table.query() method instead of "pull from list" activity.

I will close this topic since I could know about alternatives.

0 Likes