question

Ashlee W avatar image
0 Likes"
Ashlee W asked Jeanette F commented

How do I delete a row in a stat collector once it's finished?

Hi There,

How do I delete a row in a stat collector once it's finished? I only want the stat collector table to reflect patients who are currently in a location. Therefore once they leave I would like to delete the row from the table.

I tried the following in a custom code (below) for the "On Row Finished" trigger but I am getting an error saying it cannot delete the row.

collector.as(Table).deleteRow(rowNum)

How do I do this correctly?

Thanks!

FlexSim 22.1.2
healthcarestatistics collectordelete row
· 1
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Ashlee W, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Ashlee W commented

That sounds more like you should be pushing and pulling from a List.

· 3
5 |100000

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

Ashlee W avatar image Ashlee W commented ·
Can you create dashboard elements from a list though? I think it has to be a stats collector.
0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Ashlee W commented ·
What you could do is add a column to the statistics collector that reflects whether the row is finished or not. Then you duplicate the collector's table in a calculated table while filtering for "open" rows. The calc. table then feeds the dashboard charts.
0 Likes 0 ·
Ashlee W avatar image Ashlee W Felix Möhlmann commented ·
Okay, that's doable I think. I was kind of assuming that there was some sort of functionality in the stats collector to do this. Thank you!
0 Likes 0 ·