I have two fields in my table
1. Reason - text
2. ReasonCode - optionSet
I have written plugin which will trigger on record creation, I want to set value for Reasoncode based on the value in Reason field.
I have around 35 options in the Reasoncode. Is there any other way I can do this rather than using 35 if or case conditions?
As per your scenario, we need to use if..else or Switch Case to achive this Scinatio in PreCreate Operation there is no other way.
My Suggestion will be, if we are having with in 10 values its good to go with Optionset Value else its good to go with Lookup(by creating custom table)
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLABlog : https://microsoftcrmtechie.blogspot.com
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!