Forum Discussion
NicosAcuna
Mar 02, 2021Copper Contributor
Automatically assigning a value based on another column value
Hello All, I was wondering if there is a process in Sharepoint maybe using power automate that will help me fill a column automatically depending on another column value. As an example I hav...
HugoVital
Feb 28, 2024Copper Contributor
RobElliott I have a list grouped by State and I want to add a Solution ID column that I want to populate a unique ID based on the state selected. This does not seem to be working for me. How can I accomplish? All states have a unique ID # that is 15 numbers long. =IF(State=“AL”,201028145313666,IF(State=“AK”,201028145313777,”)
Rob_Elliott
Feb 28, 2024Bronze Contributor
HugoVital I assume by "Solution ID column" you mean a calculated column. You need to use a formula like this:
=IF(State="AL","201028145313666",IF(State="AK","201028145313777",IF(State="AZ","196745986234901","0")))
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
- HugoVitalFeb 28, 2024Copper Contributor
Rob_Elliott I get a message stating “The validation formula can refer to this column and not others.” I am using a Choice column by the way.
- ganeshsanapFeb 29, 2024MVP
I think you are trying to add the formula in Column Validation section of existing column - which is causing this error.
As per the suggestion by Rob_Elliott, you have to create a new calculated column with the formula. Check: Create a column in a list or library
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.