You are viewing limited content. For full access, please sign in.

Question

Question

How do I add an incremental number to the ID column of a look up table in Laserfiche Cloud?

asked on April 21, 2023

I know how to add an incremental number to the ID column of a SQL table on Prem but I am trying to mirror the process on Cloud. I created a new lookup table via Data Managment and created a Rule to insert three of the four fields on that table.  How to I insert a incremental number into the ID column automatically when the form is submitted?

 

Thank you

Incremental ID Number.png
Rule.png
Rule.png (40.52 KB)
0 0

Answer

SELECTED ANSWER
replied on April 21, 2023

If you need to create an incremental number, then you could use workflow in conjunction with Rules to increment the ID field as you upload the data to the table.  

Build a query to return the MAX value in the ID field, in my case here it was a Batch No

Then in Workflow add 1 to that token using the Token Calculator and write it to the table in the Insert Query you are using to write the data to the table with

1 0
replied on April 21, 2023

Thank you Steve for the suggestion and the screenshot. I have got it working! have a great day!

0 0

Replies

replied on April 21, 2023 Show version history

Taking a stab at your question, but does Laserfiche Cloud have Workflow Designer? If so, could you use the Custom Query tool to query all IDs(probably would have to have all rows with an ID to start off with). Store them into a multi-value token. Use Token Dialog, Apply Index 1 from the end. I.E.%(IDsStored#[-1]#) then use the Token Calculator tool to use the Addition operator to add 1 to it? Then use that result to then use when using the Insert Data tool? 

1 0
replied on April 21, 2023

Thank you Jasciel for your suggestion. Laserfiche Cloud does have Workflow Designer, but I was trying to just use the Forms and Business Process tools for this project. I am newer to Laserfiche and am just trying to learn the system.  

0 0
replied on April 21, 2023

Hi Keisha

Not sure how you are intending to use the ID field but as an FYI - Tables in Cloud each have a Key field which is hidden from view but contains a unique ID for each row when created as you would expect in a SQL table. In Cloud though, that key is a hash and not an incremental number. When you query a row of data from the table, you can also return that _key value.

1 0
replied on April 21, 2023

Thank you Steve. I actually didn't konw that the tables in Cloud have a hidden Key field that contains a Unique ID. I am learning the Cloud system now and this this helps. Thanks again!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.