'refer dynamically in assign message apigee policy

I have below apigee policy

<AssignVariable>
        <Name>Name</Name>
        <Ref>verifyapikey.verify-api-key.apiproduct.{X}</Ref>
        <Value>ErrorOnCopy</Value>
    </AssignVariable>

Now here in Ref the value of X i want to put dynamically.This X value i want to put dynamically. But this is coming in another variable "proxy.pathsuffice" like below.

proxy.pathsuffice = /dev/typeA

So i want to refer this proxy.pathsuffice value "tyeA" not "/dev/typeA" in {X} of above given policy.

Hence at runtime policy should run as below

<AssignVariable>
        <Name>Name</Name>
        <Ref>verifyapikey.verify-api-key.apiproduct.typeA</Ref>
        <Value>ErrorOnCopy</Value>
    </AssignVariable>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source