Hi,
I have a workflow that goes through a lookup on a database table to find max primary key, to be able to continue adding key values from max PK to my new records. However, I want to be able to handle a scenario where my table is all blank/empty. How can I generate 1 row on a table with 0 records? I have tried both MultiRowFormula and GenerateRows to do so, but I can't seem to figure it out.
Does anyone have a suggestion?
Use a count records tool - it returns 0 when there are no records. use a filter to test if there are 0 records. if there are not- append the count to the existent original data stream and do what you need to. If the are 0 records - create the record.
Hi @pinecone
One way of doing this: I made a small adjustment to use Generate Rows tool as a "standalone" dataset (not connected to the input tool) so it generates as many records as you like. Then Append the new records to the original PK column. You can then replace the Null values in the PK column using a Formula tool.