Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have the below statement that is returning - and i cant figure out why?
the variable does contain the correct figure and if i change the vairable to another that does the same thing but with a different value it works.
as a final error check i have changed only for count and it results in a 1 therefore this should work?
only( {1< [/rec/parameter/curval] = {$(MOSADD_M6_J3_Anticlockwise)}, [/#text] = {'MIDASOutstations'}, [/rec/parameter] = {'mosAddress'} >}[/rec])
thanks for any help
Maybe you can try change the Only to concat(XXXX, ',').
If the concat return NULL, this means there are no value found base on the condition.
If you see a "," in the value, which means there are more than one values.
Only returns - (that is null) if there are more than 1 element that has the same value.
Check your data
Hi,
If there are more than one possible for this selections [/rec/parameter/curval] = {$(MOSADD_M6_J3_Anticlockwise)}, [/#text] = {'MIDASOutstations'}, [/rec/parameter] = {'mosAddress'} then you will get null.
If you want to display then try to use MaxString() or MinString() based on your requirement
MaxString( {1< [/rec/parameter/curval] = {$(MOSADD_M6_J3_Anticlockwise)}, [/#text] = {'MIDASOutstations'}, [/rec/parameter] = {'mosAddress'} >}[/rec])
OR
MinString( {1< [/rec/parameter/curval] = {$(MOSADD_M6_J3_Anticlockwise)}, [/#text] = {'MIDASOutstations'}, [/rec/parameter] = {'mosAddress'} >}[/rec])
Regards,
jagan.
Hi,
thanks for the replies, there is no doubt there is only one value as when i change only for count it returns a 1
In your case, Only() returns NULL ( - ) if after applying the set condition, [/rec] still has multiple different values.
To see what is happening, replace Only() with Concat() which will force all different values to be concatenated into one string.
Just like Alessandro says, check your data.
No, that is not true. Your Only() may return two values, NULL and something else, but count will only "'count" one.
Maybe you can try change the Only to concat(XXXX, ',').
If the concat return NULL, this means there are no value found base on the condition.
If you see a "," in the value, which means there are more than one values.
Hi,
Do this selections manually
[/rec/parameter/curval] = {$(MOSADD_M6_J3_Anticlockwise)}, [/#text] = {'MIDASOutstations'}, [/rec/parameter] = {'mosAddress'}
and check the [/rec] field whether you have multiple possible values.
Regards,
Jagan.