AnsweredAssumed Answered

Help getting a custom function working via a portal if posible

Question asked by MarcMcCall on Aug 7, 2012
Latest reply on Aug 7, 2012 by MarcMcCall

Title

Help getting a custom function working via a portal if posible

Post

Hey guys,

 

I'm trying to get this cusom function working if posible.  It is called HiliteSingle   HiliteSingle ( text ; searchString )

Let ( [
// TEST FOR MATCH
pos = Position ( text ; searchString ; 1 ; 1 ) 
] ;
// IF MATCH IS FOUND
Case ( pos ;
// BEGIN CALCULATION
Let ( [
textBefore = Left ( text ; pos - 1 ) ;
len = Length ( searchString ) ;
string = Middle ( text ; pos ; len ) ;
textAfter = Right ( text ; Length ( text ) - pos - len + 1 ) 
] ;
textBefore & TextStyleAdd ( string ; HighlightYellow ) & HiliteSingle ( textAfter ; searchString ) 
) ;
// ELSE RETURN TEXT
text )
)

 

It works great using it on field from the same table, however I am trying to use it via a portal.

 

The portal is on table Contacts, and the portal is showing records from Addresses_Contacts||dove_account||

I have the graph set up as Contacts::dove_account = Addresses::dove_account

I have a field on the portal showing  Addresses_Contacts||dove_account||::address_description

If it is posible I would like the use the Contacts::street1 as the searchstring for the Addresses_Contacts||dove_account||::address_description in the portal.  I have tried every configuration I can think of to no avail.

Outcomes