Form_id is not unique

juggernautsei wrote on Thursday, August 11, 2016:

I fellow developers. Willie Loman here with a new installment of look what I discovered while walking through the pasture!

I have discovered that the form_id is not a unique value. Hummmm… How did that happen?
The practice wanted to only show encounters in the billing queue that have been esigned locked.
I said no problem. In the billing report, I setup a filter to check if the line that is about to written to the screen is_locked. Well, it works sort of because there are encounters with the same form_id that have been signed and some have not. There is no way right now to tell which are which without digging and viewing the encounter to see which form with the same number is locked and which one is not. Since in the signature table there is only the form_id -> tid link.

For the most part this does not affect the outside world of the esigned documents.

Has anyone else run into this?

sunsetsystems wrote on Thursday, August 11, 2016:

Assuming you are talking about the forms table. True, form_id is not unique. It’s a foreign key. The combination of formdir and form_id is unique, and you also have the primary key, forms.id.

Rod
http://www.sunsetsystems.com/