function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Benjamin BrombergBenjamin Bromberg 

Visual workflow - Creating multiple records from fields on a single record

I am a complete newbie to Flow/Visual Workflow so please bear with me. I'm working on my first flow, which will create multiple records when a new Custom Object record is created (autolaunching the Flow via Process Builder). The Custom Object (Assessment) is basically a form our team uses to collect a lot of information about a school. So when an Assessment is created, it should (among other things) create a School (custom object) and then create as many Classes (custom object) as we need within the School. The Assessment has fields like "Class 1 Grade", "Class 1 Section", "Class 2 Grade", "Class 2 Section", etc. If all the "Class 1" fields are filled in, e.g., we should create a Class record for it.

Right now, the Assessment record has room for creating up to 32 Classes. Now, I already know I can set up Decision nodes to check if a given Class's fields are filled in and then a Record Create if they are... but I'm hoping there's a more efficient way of handling this that doesn't require me to create 64 nodes. I should also clarify that for every Class created, we're also creating one additional child record to the Classes that would mean 96 nodes.

Please let me know if there's a better way! Ideally I could populate a collection variable of some kind with all the field values from the Assessment, but I haven't figured out how to make that work from multiple sets of custom fields on a single record.