As part of the V1.57 update Stored Values were enhanced to allow the storing of values as a text, this can be from your own Entered Text, another Stored Value, Historical Stored Value, or from a list of pre-set value types as shown below
Extracting Part of a Text
However sometimes you might just want to store ‘part’ of the text especially when using one of the pre-set value types which can be handy if you are displaying that value somewhere throughout Bet Angel for example in Guardian, your Ladder or One-Click trading screens.
To do this you can use the ‘Extract Text’ option, you can see from the list below you have a number of options available, so no matter what it is you want to extract you should be able to achieve it.
Depending on which of these options you choose you’ll then be given some further options to finely configure exactly what you want.
Let’s now look at that in practice and how we can use the above options. For this example I want to display the name of a Tennis Tournament next to each market in Guardian.
I’ve started by calling the Stored Value I’m about to create ‘tournament’ and stored the value type of the competition but at the moment haven’t made any alterations to the text.
AS you can see at the bottom of that image I’ve ticked the box to write the Stored Value to the log, this enables me to see exactly how it will look if/when displayed in other areas of Bet Angel, you can see that when storing the name of tennis markets it stores either WTA or ATP, then the name of the competition location, then the year.
Selecting the Text you Want
But I don’t want all this information showing, instead I just want the name of competition location, and want to remove the ATP/WTA from the beginning and the year from the end.
Because I want to remove text from both the start and end of the name for the ‘Extract Text’ option I’ve used ‘Extract words from middle of value’ and this has given me the option to specify the position of the first and last words.
So the position of my first word will be the 2nd word of the name, and the position of the last word in the name will be -1
When removing words or characters from the end by inserting a ‘minus’ symbol you can begin counting back over from the end
If I test the rule again to see how the competition name now appears in the log you can see this time it removed the first and last words as required
So now wherever I display the stored value named ‘tournament’ it will show ‘Winston-Salem’ or whatever the name of the competition is.
If I now want to display if the tennis competition is a WTA or ATP event I could do this by storing another value of the competition, this time I just need to extract all the words after the first word so can configure this as shown in the image below
If we run the rule again as a test you can now see from the log I have a Stored Value named ‘tournament’ = Winston-Salem
And a Stored Value named ‘atp/wta = ATP
These two Stored values can now be displayed throughout Bet Angel, for example in Guardian, where I’ve created custom columns to display each of the stored values
The above is just the tip of a very large iceberg of what’s possible when wanting to use/display a part of a stored value text, as I touched on earlier the options available give you the ability extract any part/s of it any way you want.