Solved

Using Equations to create/return a Dynamic Object

  • 23 September 2023
  • 5 replies
  • 104 views

Hello!

I am currently trying to build a Dynamic Object that returns a URL format where the first two numbers after the static portion of the URL represent the numerical value of the letter + 1.

For instance,  our order numbers are in the format of AV123456. I have this set to work as a dynamic object and it returns the correct URL. It is currently set as:

Target String: A,Letters (exactly 1), Digits (Exactly 6)

Target URL: ************************************next/21Digits(Exactly 6) 

It works beautifully. However, there are previous orders and future orders where the second letter is not V, and for this reason, 21 will not remain permanently static.


21****** represents the value of V(20) + 1 and the * represent the remaining numerical digits of the order number.


Is there a way to build out a dynamic reference that takes the Letter Value, Converts it to the Numerical Value and then Adds 1 to it?



 

icon

Best answer by Javier - Developer Relations 25 September 2023, 20:47

View original

5 replies

Userlevel 1
Badge +4

Hiya Ian!

From what you’ve described here, I actually think that Dynamic Objects might be a better tool for your use case: https://help.front.com/en/articles/2002

You could define multiple Dynamic Objects to cover all the variations of your ID formats without needing multiple smart rules or smart rule variables.

Let us know what you think!

Cat

Userlevel 5
Badge +8

Hi Ian,

 

As Cat mentioned, I think your best best here is to create multiple dynamic objects (one for AV → 21, another for AW → 22, etc.). I’ve noted your advanced target URL logic with our Product team, but always feel free to request a feature update via our Ideas portal.

Cheers

Userlevel 5
Badge +8

Update: Your use case could be handled by using the server / 3rd-party data feature of dynamic objects. Essentially, you’d want to have the URL logic run on your server after you pass the matching pattern to it. You can read more about how to do that in the following KB article:

https://help.front.com/en/articles/2091

Thank you both. I have Dynamic Objects that currently will cover AV000000-AV999999, so I know that it works. It’s just a matter of getting that to work once it rolls over to AW000000. I’ll get with my team to see if they can assist in working something out. 

evil.com

 

Reply