0

I am trying to save off both an entities value and name into two separate variables (if possible) but I am unable to do so easily. I currently have an entity similar to this...

<entities>
    <entity name="Employee">
        <value name="chat test" value="84"/>
        <value name="Bill Bu" value="85"/>
        <value name="Tim Roberts" value="86"/>
     </entity>
 <entities>

I am attempting to save off both the values and the names to a two different variables to do that I'm doing this

 <input>
     <grammar>
         <item>Who is (Employee)={employeename}</item>
     </grammar>
     <action operator="SET_TO" varName="employeename">{employeename.value:name}</action>
     <action operator="SET_TO" varName="employeeid">{employeename.value:main}</action>
     <goto ref="employeeData_whois"/>
 </input>

and here is where I set up the variables....

    <variables>
        <var_folder name="Home">
            <var description="The current employee being inquired on" name="employeename" type="TEXT"/>
            <var description="The current ID of employee being inquired on" name="employeeid" type="NUMBER"/>
        </var_folder>
    </variables>

For whatever reason when I try to access the employeename everything works great but I can't seem to access the employeeid ( I want to reference an external system id). Any advice?

Thanks!

eric MC
  • 766
  • 2
  • 10
  • 36

1 Answers1

1

The main point of setting a variable type to be a number is for the operators you can put on it: increment by, greater than, etc. Without doing too much debugging on this, I think the simplest solution for you would be to simply set the employeeid type to be text, and it should work properly. You can have a number in text just fine.

If I had to guess, I would bet that its looking at the array from your entity and not being able to set it, then when it tries to grab only the number from the array it breaks.

If you want to keep it as a number, you could try creating a third variable that is text to set it initially to just the number element of the array, and then once that is set set employeeid, but that seems like overkill.

Mitch
  • 849
  • 4
  • 4