Those functions are meant to be used within a while loop to show all discounts... What is it you are trying to do with them here? I have a feeling a different approach is necessary. What value do you want stored as the rule name? It looks like you only have one Discount rule applied. If you did get this working it will only show the first discount rule anyway it doesn't find the active one.