Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts
attached please find the screen of a field which gives '-', a minus to the very left.
Now I tried to replace such cases on that field with the following script:
[NodeName1] as [CDF (Level 1)],
If([NodeName2] = '-', [NodeName1] & '-', [NodeName2]) as [CDF (Level 2)]
NodeName1 is always filled with a value.
But the if clause doesn't work.
Any ideas?
Many thanks
Tom
may be this
If(isnull([NodeName3]) and isnull([NodeName2]), LEFT([NodeName1], 1) & '----',
If(isnull([NodeName3]) and not isnull([NodeName2]), LEFT([NodeName2], 2) & '---', [NodeName3]))
as [CDF (Level 3)]
may be
If(len(trim([NodeName2])) = 0, [NodeName1] , [NodeName2]) as [CDF (Level 2)]
thanks
Meanwhile I fixed it with:
If(isnull([NodeName2]), LEFT([NodeName1], 1) & '-', [NodeName2]) as [CDF (Level 2)].
But I have another challenge, still not fixed:
If(isnull([NodeName3]) and if(isnull([NodeName2]), LEFT([NodeName1], 1) & '----'), [NodeName3]) as [CDF (Level 3)]
Can you please check if the brackets are correct? I don't get any syntax errors, but don't get the wished result.
Thanks!
If(isnull([NodeName3]) and isnull([NodeName2]), LEFT([NodeName1], 1) & '----'), [NodeName3]) as [CDF (Level 3)]
Thanks, this works!
Now I have enhanced this coding by:
If(isnull([NodeName3]) and isnull([NodeName2]), LEFT([NodeName1], 1) & '----', [NodeName3])
or (If(isnull([NodeName3]) and not isnull([NodeName2]), LEFT([NodeName2], 2) & '---', [NodeName3]))
as [CDF (Level 3)]
Now the results again are not correct. The first line of the coding worked fine, added by the second line it is not working. Any idea where the code is incorrect?
may be this
If(isnull([NodeName3]) and isnull([NodeName2]), LEFT([NodeName1], 1) & '----',
If(isnull([NodeName3]) and not isnull([NodeName2]), LEFT([NodeName2], 2) & '---', [NodeName3]))
as [CDF (Level 3)]
GREAT!
Thank you!