User Event to Change Label

User Event to Change Label

ashlee_w
Not applicable
60 Views
3 Replies
Message 1 of 4

User Event to Change Label

ashlee_w
Not applicable

[ FlexSim 22.1.1 ]

OrthoSurgery_InpatientBeds_wHistos_RecalcWait.fsm

Hi there,

I want to use a user event to update a label for a group of patients in my model. I cannot figure out the syntax to access the patient labels via the custom code in the user event. Could you please point me in the right direction?

0 Likes
Accepted solutions (1)
61 Views
3 Replies
Replies (3)
Message 2 of 4

moehlmann_fe
Participant
Participant

Your code is correct. Though when I open your model the 'CurrentPatients' group contains a lot of empty pointers (no path). Trying to read a label from those will of course not work. After deleting those entries, the event seems to work correctly.

1654841846729.png

0 Likes
Message 3 of 4

james_rodgers2Y29K
Advocate
Advocate
Accepted solution

You were on the right track. The <no path> items from the CurrentPatients group were there because there wasn't anything to remove patients from the group after they had been deleted. I added a code activity to remove the patients from the group just prior to leaving in the patient process flow.

There was also an error being created by the use of CreateTokens and the WaitTimeLoop subflow in the Priority 3 patient path. I wasn't sure what your intent was there so I removed it. We can deal with that offline or in a new post.

orthosurgery-inpatientbeds-whistos-recalcwait 20220610.fsm

0 Likes
Message 4 of 4

ashlee_w
Not applicable
Thank you so much!!
0 Likes