Weird error: "This function is inappropriate for file system directories."

I got this message on a dialog list field. My scenario is this:

(1)

(2)

(1) contains two hidden fields. One is a shared field (DBEstrutura) containing the path to a database. The other one is a key (Empresa) that I use on the dialog list field.

-‘DBEstrutura’ is an editable field containing (“Apoio\Estrutura.nsf”)

-‘Empresa’ is a computed when composed field containing a name of an organization - prompt for the user to choose.

(2) contains the editable dialog list field (DestinatarioSigla) which the code for the choices I give you below:

_Server:=@Subset(@DbName;1);

_Database:= DBEstrutura;

_View:=“($SiglaPorEmpresa)”;

_Key:= Empresa;

_list:=@DbLookup(“”:“NoCache”;_Server:_Database;_View;_Key;2);

@If(@IsError(_list);@Text(_list);_list)

This field also have an input validation formula which I think is irrevalevant to the solution.

Now came the awkward situation: The choice that appear to me is only the message: “This function is inappropriate for file system directories.” At the begining I thought it could be related to the path described above. But even if I hardcode it, the message stands still.

I just save the document so I get the choices I was waiting for.

But later on I realized a most strange idiosyncratic fact: if I just copy and paste the field, the pasted one (DestinatarioSigla_1) works like a charm.

I have searched the forum and the internet without any real clue. I guess it has to be a bug envolving the first Dialog List field of a form or whatsoever.

Any hints?

Subject: UPDATE: Weird error: “This function is inappropriate for file system directories.”

I’m still working on this issue. I realize another bizarre behavior:

If I just click anywhere in the form before I click the dialog list field the choices appear ok to me and I don’t get the message “This function is inappropriate for file system directories”. If I open the form and directly clicks the field to fill it, than I get the error.

Perharps the error has something to do with the primary focus.

Subject: RE: UPDATE: Weird error: “This function is inappropriate for file system directories.”

Changing the initial focus provided a good workaround for the situation. I still didn’t find the answer.

If anyone has any clue, let me know.