Getting array entry..

i have 2 multi value fields that contain similar or related value for example Field A  contains Department Name and Field B Contains Department Manager.

Field A(Department)              Field B(Department Manager)
IT  Dept                                Joe Depth
HR Dept                                Louie HArd
Admin Dept                           Henry See
Accounting Dept                     Chu Yuan

now i need to create a Combobox(using DBcolumn) that contain the list of all Department(Field A) and if i select 1 value i will get the designated department manager..

how can i do that?

Who is Participating?
Sjef BosmanConnect With a Mentor Groupware ConsultantCommented:
In LotusScript or in Formula?

Formula example:
    combined:= AllA + "~" + AllB;
The value for B will then be:
    x:= @Trim(@Right(AllB; A + "~"));
    @If(@IsError(x); ""; x)

combined will contain a list of strings like
    IT  Dept~Joe Depth
    HR Dept~Louie HArd
    Admin Dept~Henry See
    Accounting Dept~Chu Yuan

If A contains HR Dept, then the @Right will return "":"Louie HArd":"":"" and the @Trim will reduce that to onlu Louie HArd
ZvonkoSystems architectCommented:
Here my proposal (hello sjef :)

Put this int your Department DialogList field Choices @formula:

And put this in the InputTranslation @formula of the Department field:


ZvonkoSystems architectCommented:
Perhaps this formula for InputTranslation is slightly more fool proof:


Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

ZvonkoSystems architectCommented:
Sorry, it can be simplified to this:


(wasn't that what sjef told you? uhps :)
Sjef BosmanGroupware ConsultantCommented:
ZvonkoSystems architectCommented:
amd1979Author Commented:
Field A is an array a sigle fields contains 3  or more Deprtment on a sigle document same as Filed B i only seperated them by newline..

ithink i need to determine the element number of both fields.. if i select department name, on field A i will get the corresponding element number on field B..

i want to show the value of 2 fields in seperate fields if i select department (using dblookup)
the computed field for dapartment manager will get the value of it using DB lookup also..

hope it is now more clearer..


amd1979Author Commented:
thanks i got it
amd1979Author Commented:
please help me follow up to this question..

now i need to compare the location of two array, similar to my first question

i have 2 multi value fields value  separated by semicolon

the first field contain name and the second field contain score(hidden fields)

now i need to select the first field using combobox  and the contain of second field will display on the the computed fields.



amd1979Author Commented:
this fields are hidden
First field        Second field
Ariel               11 points
Jon                 20 Points
Nesa               13 points
this two field have alway equal value

now im going to pass the value of hidden first field to Combobox and if i select any value the corresponding score will be displayed on the computed text..

ZvonkoSystems architectCommented:
I do not see the difference?
Basically it same as this:


The upper assumes this field names:
1.) Field with all Names as multiple values: namesListField
2.) Field with all Points as multiple values: pointsListField
3.) Field with the searchin Name value: singleName
4.) Field for the target Point value: Points

Sjef BosmanGroupware ConsultantCommented:
Better post a new question...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.