Jump to content

Format Phone from External Data File


dml1280

Recommended Posts

How do I apply a phone format (ie. 123.456.7890) to a phone number being pulled from an external data file?

 

I have rules for each, but can't figure out how to combine them.

 

Thank you.

 

Here is the rule that pulls the phone number from the external data file:

 

returnStr = '';

if(FusionPro.Composition.isPreview == true || FusionPro.inValidation == true)
{
   Rule("OnJobStart");
}

numRecsExtDF = externalDF.recordCount;

for (recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++)
{
   if (externalDF.GetFieldValue(recordWalker, 'Location') == Field("Location"))
   {
       returnStr += externalDF.GetFieldValue(recordWalker, 'Phone');
   }
}

return returnStr;

Edited by dml1280
Link to comment
Share on other sites

Answering my own question...I totally overthought this.

 

The answer is to have the phone set with the proper formatting in the external data file. Since I have control over the data file, I can make sure it's consistent every time.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...