Discovery rule - generate hostname

Problem: unable to generate hostname with discovery rule

Expected outcome: hostname should look like : (for example)

Foreman and Proxy versions: 1.16

Foreman and Proxy plugin versions:

Other relevant data:

I tried the following :

servicename<%= rand(9999) -%>.us.ny

but get error on pxe


Hello, will you provide the error?