Skip to Content
author's profile photo Former Member
Former Member

Format Search in document-level UDF cannot access fields in main window

Hello all:

Just checking to see whether this is supposed behaviour or not:

I have a Formatted Search in a UDF on document level (the window that opens with ShiftCtrlU). This FS automatically refreshes when the "Series" field is changed. The FS works, as long as it's triggered from a field in the main window (such as the Series field), but it does not work from the UDF window itself by clicking on the FS icon, because in that case the FS does not seem to have access to the field variables in the main window (such as

$[$8.0.0]

and

$[$88.0.0]

Is this wanted behaviour or some kind if bug?

Thanks for your opinions,

Joerg.

PS: The query is the following:

declare @ncf nvarchar(19)
SELECT @ncf = (SELECT ISNULL(BeginStr,'') + ISNULL(EndStr,'') + $[$8.0.0] FROM NNM1 WHERE Series = $[$88.0.0])
SELECT CASE WHEN LEN(@ncf) < 19 THEN 'FAVOR DIGITAR' ELSE @ncf END

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 07, 2009 at 04:43 PM

    That is normal system behavior. All $ sign values are only refer to current form. If you are in UDF form, the variable would be gone.

    Thanks,

    Gordon

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.