Automatically update date field based on the pick-list value of another field

Automatically update date field based on the pick-list value of another field

Hello everyone,

I've been trying to find a way where a date field gets automatically updated according to the value of a different pick-list field.

The pick-list field can have the value "3 months from now" or "6 months from now". The logic is that we want the field "offboarding date" to become the last day of the third month from the current date (or the sixth if the second option is picked). For example, if the pick-list value is "3 months from now" and it's picked at 25/11, the value of the the offboarding value must become 28/2/2025 (the last day of the month which is +3 from the current month).

I tried to make this work with a workflow and some deluge functions and with a formula field that returns a date, but so far I had no luck.

I think the best way to do this is within deluge but I can't seem to find the way to make it work.

Any help would be greatly appreciated!