You need to sign in to do that
Don't have an account?
WPCMS
Can you make a Formula a unique value?
We enter our vendor invoices into our system and we have issues with duplicate invoices being entered. I wanted to make the vendor invoice number field (text) unique BUT what if there was the same invoice number for more than on vendor? (believe me it does happen with vendors who have four or three digit invoice numbers.)
I then thought of a way to create a formula that would concatenate the vendor account code with the vendor invoice number. That would then be a very unique number. BUT I don't think that you can make formulas unique.
What can I do?
You're right, you can't make a formula field unique. But you can still do this. You're halfway there with your Formula(Text) field that concatenates the Vendor ID and the Invoice Number.
Now all you need is a straight Text Field that is set to "No Duplicate Values allowed" then create a WorkFlowRule with a Field Update that will populate your custom Unique Text field with the value from your concatenated Formula(Text) field, and you're good to go.
PS. You owe me another beer!
PPS. I'm still waiting the first one ;-)
All Answers
You're right, you can't make a formula field unique. But you can still do this. You're halfway there with your Formula(Text) field that concatenates the Vendor ID and the Invoice Number.
Now all you need is a straight Text Field that is set to "No Duplicate Values allowed" then create a WorkFlowRule with a Field Update that will populate your custom Unique Text field with the value from your concatenated Formula(Text) field, and you're good to go.
PS. You owe me another beer!
PPS. I'm still waiting the first one ;-)
It woks! Thank you for you help.
Sorry I don't drink beer, so I don't have it handy. But I do have whiskey :)
Last time I answer one of your questions... ;-)
Can you pls elaborate.
I have the same issue but not able to understand your approach.
It will be helpful for me if you can provide one demo example of your apporach.
Thanks,
Gyanender Singh
With Winter 18, time functions have been added to formulas. This allows us to get a unique value:
See Below:
((Year (Datevalue (now() ))-2000)*10000000000)+
(Month (Datevalue (now() ))*100000000 )+
(Day (DateValue (now() ))*1000000 )+
(Hour (Timevalue (timenow() ))*10000 )+
(Minute(Timevalue (timenow() ))*100 )+
(Second(Timevalue (timenow() )))
Note: I shortened the Year to two digits to reduce the size of the value.