Manage Learn to apply best practices and optimize your operations.

# Get the reverse of an alias

## Domino Resources

### Looking for something else?

```If you have a field called "KeywordList" that has the following values:

"Test1 | 1"
"Test2 | 2"
"Test3 | 3"
"Test4 | 4"
"Test5 | 5"

That you use to populate another keyword field Called "SelectFromList"

After a person selects the values:
Test1
Test5
the values 1,5 are stored in "SelectFromList."

For whatever reason, you need to know the Alias. If the list is very
large, this becomes very difficult.
The GetReverseAlias function tells you what those Alias are.  ```

```How to call
Call doc.ReplaceItemValue( "SelectedFromListAlias" , GetReverseAlias(
doc.GetItemValue( "KeywordList" ), doc.GetItemValue( "SelectFromList" ))  )

Function GetReverseAlias( varAllList As Variant, varKeywords As Variant ) As Variant
Dim Alllist List As String
Dim strAlias As String
Dim strValue As String

Dim strReturn() As String
Dim intCount As Integer
intCount = 0
Redim strReturn(intCount)
strReturn(intCount) = ""

Forall strOneValue In varAllList
strAlias = Trim( LeftOfString( Cstr( strOneValue ), "|" ) )
strValue = Trim( RightOfString( Cstr( strOneValue ), "|" ) )
If Not ( Iselement( AllList( strValue ) ) ) Then
Alllist( strValue )  = strAlias
End If
End Forall

Forall strOneKeyword In VarKeywords
Redim Preserve strReturn(intCount)
If  Iselement( AllList( strOneKeyword ) ) Then
strReturn(intCount) = Alllist( strOneKeyword )
Else
strReturn(intCount) = ""
End If
intCount = intCount + 1
End Forall

GetReverseAlias = strReturn
End Function

Function RightOfstring ( strSource As String, strSearch As String ) As String
Dim intPos As Integer
Dim intLength As Integer
Dim intStart As Integer

intPos = Instr ( strSource, strSearch )
intLength = Len( strSource )
intStart = intLength - ( intPos + Len( strSearch ) - 1 )
RightOfstring = Right ( strSource, intStart )
End Function

Function LeftOfstring ( strSource As String, strSearch As String ) As String
Dim intPos As Integer
intPos = Instr ( strSource, strSearch )
If intPos > 0 Then intPos = intPos -1
LeftOfstring = Left ( strsource, intPos )
End Function```
This was last published in June 2001

#### Start the conversation

Send me notifications when other members comment.

## SearchWindowsServer

• ### Creating PowerShell scripts for task automation

At a certain point, administrators who run PowerShell commands from the console will find it more efficient to develop a script ...

• ### Windows Defender Credential Guard secures login data

Windows Defender Credential Guard uses virtualization to isolate access to domain credentials and diminish the threat of attacks ...

March Patch Tuesday adds several more mitigations for the Spectre and Meltdown exploits, this time for 32-bit server and client ...

## Search400

• ### iSeries tutorials

Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

• ### V6R1 upgrade planning checklist

When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

• ### Connecting multiple iSeries systems through DDM

Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

## SearchDataCenter

• ### IBM cloud services to secure mainframes out to the edge

Big Blue will introduce IBM cloud services that use blockchain, containers and its z14 mainframes to deliver improved security ...

• ### Four disadvantages of hyper-converged infrastructure systems

Problems with scalability and unexpected licensing costs can create problems for organizations that deploy hyper-converged ...

• ### IBM Power9 servers seek market inroads to AI, cloud

IBM follows up its first Power9 server with a raft of systems designed to appeal to a wider array of markets -- most notably, AI ...

## SearchExchange

• ### Office 365 email encryption options grow for enterprise needs

Each enterprise has different needs when it comes to preventing data leakage. Admins should be aware of the Office 365 mailbox ...

Everyone wants a smooth patching process, but things can fall apart despite everyone's best efforts. Develop a solid recovery ...

• ### New Office 365 administrators grapple with challenges

More enterprises mulling the move to Office 365 should factor in the adjustments necessary to get the IT department up to speed ...

## SearchContentManagement

• ### Scrivito unveils serverless CMS product

By building the CMS with ReactJS, Scrivito gained attraction with development community, according to an analyst.

• ### Content personalization tools sharpen focus on customers

Content personalization isn't new; Amazon weaponized it, and Jeff Bezos is the world's richest man. New tools are putting it ...

• ### Leading brands see the need for personalized content

Content personalization continues to expand within companies as maturing technologies make it a viable marketing option for ...

Close