Jump to content

error in custom function


dysong3
 Share

This topic is 2841 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I am trying to install a custom function from http://www.briandunning.com and can't see why I am getting an error message.  

The message is "An operator (e.g. +,-, *, …) is expected here."

 

The function is :

Let(

[NumbersOnly = Filter(Phone; "0123456789");
NewNumber = Right(NumbersOnly; Length(NumbersOnly) - 1);
NewFormat = Right(Format; Length(Format) - 1)];

Case(

not IsEmpty(Format);

Case(
Left(Format; 1) = "#";
Left(NumbersOnly; 1) & PhoneFormat(NewNumber; NewFormat);
Left(Format; 1) & PhoneFormat(NumbersOnly; NewFormat)
)

)

)

The error occurs on the opening parentheses here "PhoneFormat(NewNumber;)"

 

I have this same function working perfectly on another file and can't see why I getting this error on the file I'm working on.

 

Can someone point me in the right direction?

Link to comment
Share on other sites

The setup works.. make sure the Function Name is right. this is recursive function that calls itself so the name has to match

 

here is the recursive call... Left(NumbersOnly; 1) & PhoneFormat(NewNumber; NewFormat);

 

The Function Name match the bold underline italic

Link to comment
Share on other sites

 

I have this same function working perfectly on another file and can't see why I getting this error on the file I'm working on.

 

Can someone point me in the right direction?

You do know that with FileMake Pro Advance, you can Copy a Custom Function in one file and Paste it into another, right?

Link to comment
Share on other sites

Thanks very much for you replies.  When I saw "make sure the Function Name is right. this is recursive function that calls itself so the name has to match", I thought of course.  But then I went and tested it again and this time it worked with a different Function Name than in the function.  So I resolved the problem but not my understanding of it.

I also realised after posting that in Advanced not only can you copy and paste functions but you can import them directly from another file. 

Thanks for all that.

Link to comment
Share on other sites

But then I went and tested it again and this time it worked with a different Function Name than in the function.  So I resolved the problem but not my understanding of it.

 

Yes, I think by now you have increased the overall level of confusion considerably. Would it be possible to see a screenshot of your original attempt, with the error message?

Link to comment
Share on other sites

 

I also realised after posting that in Advanced not only can you copy and paste functions but you can import them directly from another file. 

 

and a Utility such as Clip Manager 4

Link to comment
Share on other sites

This topic is 2841 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.