Relative Tag Path and Alarm Priority

I am attempting to condition(using an expression) the priority of a UDT instance's alarm priority based on the value of another tag.

Below is the rough structure of that alarm priority value I'm trying to set, and the OPCTag value I need to reference,
[TagProvider]A/B/N/UDTInstance_B/AlarmFolder/OPCTag/Alarms/Alarm.Priority

[TagProvider]A/B/C/DifferentUDTInstance_B/AlarmFolder/OPCTag

I need to make this binding generic enough such that B can change and my expression will still work, but I'm not sure how to make this work since I can't declare "B" as a variable using expression syntax. In my project, B is a folder representing a process #, and is used as the suffix for instances of UDTs of which there are many.

Does anyone have any ideas how I might be able to solve this? I've tried using scripting, but it seems ignition blocks writing to the .priority property.

Your script might need to write to a parameter of the UDT instance which has the alarm configured, which can be referenced in the binding for the alarm severity.
I’m not a huge fan of writing to params across separate UDT instances, so leave bread crumbs (document the process) for the person who has to reverse engineer / troubleshoot any issues.

Thanks, I was hoping to avoid adding another parameter or property if possible. Preferentially using an expression, however it's turning out to be more complicated than I expected.

You could set up two (or more) separate expression tags (with static alarms configured on each) whereby only one would turn on based on status of other tag values.