Hi all, this is using LF Cloud:
I have a goofy anomaly in which a Collection will not preserve throughout my Business Process when all rows are removed.
Step 1, Form 1: Add Employees:
Step 2, Form 2: Remove Employees (this example I removed two to show this works)
Step 3, Form 3: Collection shows two employees remaining
Now, if I remove all rows in Step 2, Form 2:
It does not retain ANY removal in Step 3, Form 3:
I was thinking initially this could be a disabled field error (as I have JS that disables / enables forms on field changes), but it seems I've replicated the circumstances down to this instance.
Perhaps it has something to do with how collections are stored as empty object -> single string -> array in Laserfiche? (side note: now I just convert all single set items into arrays to make the JS more manageable)
Because I'm on Cloud, I can't think of a reasonable way to use LFForms to interact with this (because the ways you can interact with Collections are limited).
Maybe I could make a radio button in Form 2 to enact a ruleset in Form 3 to Hide the collection and ignore the data when hidden, but that's about all I can think of (would that then effectively make the set empty??).
Collection Settings are:
Form 1: range of sets [0 min, 500 max]
Form 2: range of sets [0 min, 500 max] (enables editing, adding , deleting)
Form 3: append set [0 min, 0 max] (prevent adding)
Appreciate any help, thanks!
UPDATE: My Radio button effort does not clear the collection set data, as I have some Javascript that injects an HTML Table using the collection field data. Suppose I could add a variable to fetch the Radio Button field value when executing the LFForm JS.
UPDATE 2: I am able to use the radio button field to substitute the field values I pulled as an empty set. The only issue I have with this is that it could be confusing for a form user with yet another extra field. If they delete all the rows using the X's, they shouldn't have to click an extra button.
NOTE: My Ruleset in Form 3 is actually confined to hiding the Collection, and not each Item in the Collection Set. Reason being is I have other pre-existing rules, and having multiple rules on the same field is advised against.
NOTE 2: This workaround isn't fully complete either. Because the Collection Set still retains the data, altering the template fields becomes more cumbersome.