SOLVED

Question on how to handle two columns in sharepoint

%3CLINGO-SUB%20id%3D%22lingo-sub-2376028%22%20slang%3D%22en-US%22%3EQuestion%20on%20how%20to%20handle%20two%20columns%20in%20sharepoint%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2376028%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20list%20with%20this%20columns%20one%20is%20Division%20data%20type%20text%2C%20and%20i%20have%20another%20column%20data%20type%20choice%20with%20names%20of%20users%20and%20i%20would%20like%20to%20display%20the%20user%20name%20based%20on%20the%20division%20on%20another%20column.%20How%20can%20i%20accomplish%20this%3F%20EX%3A%20Column%20Division%20will%20be%20generated%20by%20a%20form%20the%20user%20will%20be%20submitting.%26nbsp%3B%3C%2FP%3E%3CP%3ENot%20sure%20if%20this%20is%20possible%20with%20a%20calculated%20column.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2376028%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2376582%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20on%20how%20to%20handle%20two%20columns%20in%20sharepoint%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2376582%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1045213%22%20target%3D%22_blank%22%3E%40Patty2190%3C%2FA%3E%26nbsp%3BHow%20many%20divisions%20you%20will%20have%20at%20a%20time%20in%20list%3F%20If%20those%20are%20fixed%2C%20you%20should%20create%20a%20choice%20field%20for%20division.%20Then%20you%20can%20easily%20show%20the%20user%20name%20based%20on%20division%20using%20calculated%20column%20like%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-javascript%22%3E%3CCODE%3E%3DIF(%5BDivision%5D%20%3D%20%22HR%22%2C%20%22HR%20User%22%2C%20IF(%5BDivision%5D%20%3D%20%22SharePoint%22%2C%20%22SharePoint%20Admin%22%2C%20%22System%20Account%22))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20add%20multiple%20nested%20IF%20conditions%20based%20on%20your%20requirements.%26nbsp%3B%3C%2FP%3E%3CHR%20%2F%3E%3CP%3EPlease%20click%26nbsp%3B%3CSTRONG%3EMark%20as%20Best%20Response%3C%2FSTRONG%3E%26nbsp%3B%26amp%3B%20%3CSTRONG%3ELike%3C%2FSTRONG%3E%20if%20my%20post%20helped%20you%20to%20solve%20your%20issue.%20This%20will%20help%20others%20to%20find%20the%20correct%20solution%20easily.%20It%20also%20closes%20the%20item.%20If%20the%20post%20was%20useful%20in%20other%20ways%2C%20please%20consider%20giving%20it%20%3CSTRONG%3ELike%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I have a list with this columns one is Division data type text, and i have another column data type choice with names of users and i would like to display the user name based on the division on another column. How can i accomplish this? EX: Column Division will be generated by a form the user will be submitting. 

Not sure if this is possible with a calculated column. 

1 Reply
best response confirmed by Patty2190 (Occasional Contributor)
Solution

@Patty2190 How many divisions you will have at a time in list? If those are fixed, you should create a choice field for division. Then you can easily show the user name based on division using calculated column like:

 

=IF([Division] = "HR", "HR User", IF([Division] = "SharePoint", "SharePoint Admin", "System Account"))

 

You can add multiple nested IF conditions based on your requirements. 


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.