ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > N.A.N.Y. 2011

NANY 2011 Teaser Update: ContactFX 0.0.2.0

<< < (7/9) > >>

Perry Mowbray:
I've just uploaded 0.0.2.0 that should fix all reported bugs and finish the implementation of the main panel (though not all the fields).

This release includes a significant improvement in ContactFX functions, so I thought I better explain how they work...

Functions are defined within {} and must be prefaced with an "=" (like field links). Functions have the general form of { FunctionName 'optional constant' functionObject }. To use a function just type it into the appropriate text box, eg:
--- Code: Ruby ---={UCASE "mowbray"} would display as "MOWBRAY".

Functions generally comprise:

* a function name: case insensitive
* an optional function constant: defined within ''
* a function object, that can be:

* a string: defined within ""
* a path to a field, eg: id#fieldnumber or id#fieldname
* a function: defined within {}
* an array of function objects: defined within []
Current Functions
Initialise:
--- Code: Ruby ---{ INITIALISE name.additional }If the text in the Additional Name field is "perry" the above function will return "P."

UCase:
--- Code: Ruby ---{ UCASE 1#name.family }If the text in the Family Name field of Contact #1 is "mowbray" the above function will return "MOWBRAY"

Join:
--- Code: Ruby ---{ JOIN ', ' [ "me" , name.additional , { UCASE name.additional(2) } ] }This is a conditional join: if the object being joined is non-blank then it is joined to the previous joined result with the constant. If the text in the first Additional Name is "myself" and the text in the second Additional Name field is "i" then the above function will return "me, myself, I"

Ternary:
--- Code: Ruby ---{ name.additional ?? 'Additional Name is empty' }Well, like a ternary... if the Object is blank then the constant is returned otherwise the Object is returned. For example: If the Additional Name field is empty then the above function will return the constant "Additional Name is empty".
If the Additional Name field has the text "Samuel" then the above function will return "Samuel".

Conditional Pad:
--- Code: Ruby ---{ 'Mr. ' && name.family}
If the text in the Family Name field is empty the above function will return an empty string "".
If the Family Name field has the text "Mowbray" the above function will return "Mr. Mowbray"

--- Code: Ruby ---{ name.family && ' esq.'}
If the text in the Family Name field is empty the above function will return an empty string "".
If the Family Name field has the text "Mowbray" the above function will return "Mowbray esq."


This userField:  has a definition that will modify the default displayName field:

--- Code: Text ---<fielddefinition>  <name value="displayname" />  <source value="=  { { JOIN ' ' [ name.given , { INITIALISE name.additional } , { UCASE name.family } ] } ?? 'New Entry' }" /></fielddefinition>
When unzipped into the userFields subDirectory the displayName field display:
Given Name = "Perry"
Additional Name = ""
Family Name = "Mowbray"
Display Name = "Perry MOWBRAY"

Given Name = "Sandra"
Additional Name = "Jane"
Family Name = "Mowbray"
Display Name = "Sandra J. MOWBRAY"

The easiest way to link between contacts is to drag the field to be linked to, onto the the field to be linked from holding down the ALT key. Linked fields can be referenced by Contact.ID or Contact.GUID and Field.ID or Field.Name, although they are always displayed as Contact.ID#Field.ID.

Next stop... list Panel  :Thmbsup:

Perry Mowbray:
Hey Jim:

And I initially thought that the Formatted Name field would be kind of a "Display As" field, automatically filled by the other name fields that are manually populated, but that doesn’t seem to be the case. Or at least not yet - perhaps this is simply something that isn't yet implemented?
-J-Mac (October 07, 2010, 01:13 PM)
--- End quote ---

Have a look at the new version and the displayName userField attached to this post (or in the OP): (see attachment in previous post)
-Perry Mowbray (October 13, 2010, 08:13 AM)
--- End quote ---

That file will modify the displayName field to dynamically display an aggregation of other fields. Is that what you meant? The source string could also be added to the defaultvalue if you didn't want it to be dynamic (just filled at creation time). The same can be done with any field...

Perry Mowbray:
Can you add a couple more fields
-timns (October 07, 2010, 05:27 PM)
--- End quote ---

You may like to have a look at the beginnings of userFields:
(see attachment in previous post)
--- End quote ---

This will allow you to create as many fields for your own use as you like  ;)

Of course... I will be adding more to the programme....

J-Mac:
Hi Perry.

Regarding Display_Name, that is it basically. However please realize that there should be a setting where one selects how they want their contact names to display: First_Last, Last_First, etc. And the ability to set it separately for each contact if desired. Otherwise you end up with contacts displayed like: "The White Company" displaying as "Company, White The"

Thanks!

Jim

Perry Mowbray:
Regarding Display_Name, that is it basically. However please realize that there should be a setting where one selects how they want their contact names to display: First_Last, Last_First, etc. And the ability to set it separately for each contact if desired. Otherwise you end up with contacts displayed like: "The White Company" displaying as "Company, White The"
-J-Mac (October 13, 2010, 09:43 PM)
--- End quote ---

You can edit the file yourself to what ever you like Jim. Take the file supplied and change the source value to suit. You can also edit the value in ContactFX on an adhoc basis.

You can also create a new one called displayLastFirst and another called displayFirstLast and even another called displayCompany which could all have different source and/or default values, etc.

When contact templates are done I presume there will be a company template with a displayName set up to suit.

Also Note: That there is no requirement to have a given name and a family name in the record: Companies don't have those. ( :-[ But I think I set Given Name to be required once -- that's a left over from testing the max / min settings that'll I'll have to delete ) ... I imagine that on companies there will only be formatted name.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version