Forum Discussion

KarahWeber's avatar
KarahWeber
Qrew Member
3 years ago

Based on the number of units in a project, create new property records?

Hi,
When I type it out, it seems simple but I can't figure it out.
Background: I work for a real estate company where we often take on projects that have multiple units on the same area of land- think of townhomes.

If I'm in a project record with "Units= X", I'd like to create X number of new property records in the properties table. I'm trying to achieve this with a pipeline, but I can't figure out how to iterate through a loop X number of times based on the value of a record. 

Please help! Thank you in advance!

------------------------------
Karah Weber
------------------------------
  • If I understand correctly, you have 2 tables
    Project
    Units

    Upon save of a Project you want to kick off a workflow that'll create child unit records based on the value of the "Number of Units" field in the Project record.

    I had a similar use case and also realized that there was no way to loop x number of times in a pipeline, however this could be done in a webhook on the Project table with a call to the API_ImportFromCSV on the Units table.
    The payload would be generated using a jinja loop inserting multiple identical records into the units table with the current Record ID as the Related Project on the unit

    ------------------------------
    Simon H
    ------------------------------