I'm trying to add some data onto the end of an existing property value (actually the call duration for a completed call) -so in the task I have updated the value of "PropertyName1" which is "John Smith" with
%%PropertyName1%% (%%PropertyName2%%)
intending to append the call duration but the result is that the new value contains the property name rather than the value ie
%%PropertyName1%% (10:20) rather than
John Smith (10:20)
Is there a way around this ?
K
Appending info to a property value
-
- Senior Member
- Posts: 103
- Joined: Sun Jul 31, 2005 2:43 pm
- Location: Yorkshire UK
Re: Appending info to a property value
Have your task call this script. Just fill in the <Device Name> with your device name.
Osler
Code: Select all
Option Explicit
Dim PropertyUpdate
PropertyUpdate = GetPropertyValue("<Device Name>.PropertyName1")
PropertyUpdate = PropertyUpdate & " (" & GetPropertyValue("<Device Name>.PropertyName2") & ")"
Call SetPropertyValue("<Device Name>.PropertyName1", PropertyUpdate)
-
- Senior Member
- Posts: 103
- Joined: Sun Jul 31, 2005 2:43 pm
- Location: Yorkshire UK
Re: Appending info to a property value
Thanks Osler - I'll give that a try..
However I'm also now thinking it might be a different problem as values from other properties are being substitued as their name ie %%property.name%% rather than the property value. I'm selecting them via the task editor dialogs. I wonder if its something to do with specific plugin properties or naming... I'll report back...
eg here's a value and each of the three properties used have their own values.
%%CID.Direction.xAP BSC Text%% : %%CID.Time.xAP BSC Text%% %%CID.Duration.xAP BSC Text%%
should display
OUT: Friday 12:22 23:56:00
but displays the names as per 3 lines above
K
However I'm also now thinking it might be a different problem as values from other properties are being substitued as their name ie %%property.name%% rather than the property value. I'm selecting them via the task editor dialogs. I wonder if its something to do with specific plugin properties or naming... I'll report back...
eg here's a value and each of the three properties used have their own values.
%%CID.Direction.xAP BSC Text%% : %%CID.Time.xAP BSC Text%% %%CID.Duration.xAP BSC Text%%
should display
OUT: Friday 12:22 23:56:00
but displays the names as per 3 lines above
K
Re: Appending info to a property value
The problem you are seeing is due to the fact that either the Device or Property name you are using in the substitution contains a period (.). The logic that parses out the Device and Property names in the substitution string uses the period as the delimiter. Since there is more than one period in the substitution string, it incorrectly handles that case.
Scott
-
- Senior Member
- Posts: 103
- Joined: Sun Jul 31, 2005 2:43 pm
- Location: Yorkshire UK
Re: Appending info to a property value
What would be the best thing to do about this Scott ? The device names, and property values are being auto created (in this case by the xAP plugin) based on the the original names which will always have the '.' character in them - and at least two of them :-(
Is it possible to change something in HouseBot to avoid this, perhaps using a more unusual delimiter (non printable ?) or should we rewrite the plugin to strip out the '.' characters and replace them with something else ? I'm not quite sure what though as the '.' is our key hierarchical delimiter and all other printable ASCII characters are permitted in xAP source names.... and we would have to resubstitute the '.' characters in order to correctly address the xAP devices for control...
K
PS Will this cause issues in scripted changes too ?
Is it possible to change something in HouseBot to avoid this, perhaps using a more unusual delimiter (non printable ?) or should we rewrite the plugin to strip out the '.' characters and replace them with something else ? I'm not quite sure what though as the '.' is our key hierarchical delimiter and all other printable ASCII characters are permitted in xAP source names.... and we would have to resubstitute the '.' characters in order to correctly address the xAP devices for control...
K
PS Will this cause issues in scripted changes too ?
Re: Appending info to a property value
The best thing would probably be for the server to do a better job in determining what the device name is in these cases. It just assumes that everything is Device.Property. I imagine you are seeing error messages about the Device not being found when the substitution occurs. In these cases the server should see if there are multiple periods and try and parse the combined name.
Unfortunately, I just released 3.30 last week, so an update won't be available for a while.
Unfortunately, I just released 3.30 last week, so an update won't be available for a while.
Scott
-
- Senior Member
- Posts: 103
- Joined: Sun Jul 31, 2005 2:43 pm
- Location: Yorkshire UK
Re: Appending info to a property value
The timing wasn't brilliant was it If you do get an opportunity to change this then making it to a subsequent beta will suffice for me.
Cheers Kevin
Cheers Kevin
Re: Appending info to a property value
It will be fixed in the next maintenance release. I'll try and get you a preliminary copy so you can test it out.
Scott