Automatically assigning a value based on another column value

%3CLINGO-SUB%20id%3D%22lingo-sub-2179823%22%20slang%3D%22en-US%22%3EAutomatically%20assigning%20a%20value%20based%20on%20another%20column%20value%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2179823%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20wondering%20if%20there%20is%20a%20process%20in%20Sharepoint%20maybe%20using%20power%20automate%20that%20will%20help%20me%20fill%20a%20column%20automatically%20depending%20on%20another%20column%20value.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20an%20example%20I%20have%2026%20Departments%20listed%20as%20possible%20choices%20in%20column%20A%3C%2FP%3E%3CP%3EI%20want%20Column%20B%20to%20auto%20generate%20a%20DepartmentID%20based%20on%20the%20department%20selected%20in%20column%20A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20every%20time%20HR%20(one%20of%20the%2026%20departments)%26nbsp%3B%20is%20selected%20in%20column%20A%20it%20will%20generate%20a%20%221%22%20in%20column%20B.%3C%2FP%3E%3CP%3EEvery%20TIme%20Operations%20is%20selected%20in%20column%20A%20it%20will%20auto%20populate%20a%20%222%22%20in%20column%20B.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20so%20on%20and%20so%20fourth%2C%20my%20apologies%20if%20there%20is%20a%20simple%20solution%2C%20I'm%20quite%20new%20to%20using%20SharePoint%20and%20power%20apps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2179823%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Lists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

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 have 26 Departments listed as possible choices in column A

I want Column B to auto generate a DepartmentID based on the department selected in column A

 

So every time HR (one of the 26 departments)  is selected in column A it will generate a "1" in column B.

Every TIme Operations is selected in column A it will auto populate a "2" in column B.

 

And so on and so fourth, my apologies if there is a simple solution, I'm quite new to using SharePoint and power apps.

1 Reply

@NicosAcuna well you could do it with a Switch control in Power Automate as you would be just inside the 27 case limit, but it's more work than having a calculated column using multiple If expressions. So your department column would be a choice column then you'd add the following formula to your DeptID calculated column:

=If(Department="HR",1,If(Department="Operations",2,If(Department="Warehouse",3,"")))

etc etc.

calculatedColumnFormula.png

 

calculatedColumn.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User