Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
could you please share your ideas of below code:
=Only({<empfullname={'$(mfullname)'}>} [emp name])
in above code i want to display else part --else part is 'No EMP name Found'
means when comparing the empfullname to $(mfullname) .if both texts are matching then it will display [emp name]---
if both text are not matching then i want to show 'No EMP name Found'
please suggest me How can i implement this functionality in Only function
=If( Len(Only({<empfullname={'$(mfullname)'}>} [emp name])),
Only({<empfullname={'$(mfullname)'}>} [emp name]),
'no EMP name Found')
You can try,
If( Not Isnull(Only({<empfullname={'$(mfullname)'}>} [emp name])),
Only({<empfullname={'$(mfullname)'}>} [emp name]),
'No EMP Name found')
=If( Len(Only({<empfullname={'$(mfullname)'}>} [emp name])),
Only({<empfullname={'$(mfullname)'}>} [emp name]),
'no EMP name Found')
Hi Bobby,
The ONLY function will return a NULL when there is no match in your example.
The function does not provide a parameter to show when no match is found, but you can handle the null in multiple ways.
A simple example would be to use an IF:
If(ISNULL(Only({<empfullname={'$(mfullname'}>} [emp name])),
'No EMP name Found',
Only({<empfullname={'$(mfullname'}>} [emp name])
)
I hopw this is what you were looking for.
Regards