question

Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst asked Joerg Vogel commented

Remove EndOfArray value does not work in assign labels dropdown

Hi,

When I have an array on a label on a token in PF and I want to remove the last value from that array with the dropdown option it does not work. Selecting the EndOfArray option in the dropdown does not remove the last value from the array. See the simple attached model.

Thanks for the next bug fix.

endofarray.fsm

FlexSim 18.2.2
endofarray
endofarray.fsm (23.3 KiB)
· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

David Chan avatar image David Chan commented ·

@jordan.johnson has this been solved? It is still not working in 2020.

I have made the following changes at Line 20 to make it works.

Array removeArray = removeItem;

int removeSize = removeArray.length;

int arraySize = array.length-removeSize; (addition)

Am I right?

David

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel David Chan commented ·
Array.pop()

It is probably not a drop down list item, but the method works.

0 Likes 0 ·
David Chan avatar image David Chan Joerg Vogel commented ·
@Jörg Vogel

Thanks. Do I use this to replace the whole code or only line 20?

Meaning I am not sure how do I apply it? Will you be able to share more?

David

0 Likes 0 ·
Show more comments

1 Answer

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered

This is a bug. I will put it on the dev list. The Array class has a pop() method, meant to remove the last value from the array. You can use that until we fix this issue.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.