Keyword field selection scripts

hi,

I have two keywords fields, called 'publish' and 'delete'

each have three values, all can be selected..

so 'publish' could be 'test, review, live' one or all may be selected.

when a user wants to remove this doc from any of above they use 'delete'
again the values will be the same.

if they select say 'test' in the delete keyword list, I want it to be removed from the 'publish' list and added to the 'delete' list, again one or more may be selected.


tashsmithAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sjef BosmanGroupware ConsultantCommented:
More info needed... I'll try to write down what I understand from your question.

Both fields are Editable, multi-value?
Can a user change both fields at the same time?

What do you want to do with the lists? In fact, what is it you intend to do at all? And what are you asking from us, assistance, some @Formula or LotusScript?
tashsmithAuthor Commented:
both fields are editable, multi-value.
the user can change either at any point.

 i want a script to prevent any value from appearing in both fields, do someone does not have say 'test' in both 'delete' and 'publish' field.

not sure the best wy to do this, whether an onsave command, says you can't have 'test' in both these fields, please change.
or have the selected value removed from the other field, should it be present.
Sjef BosmanGroupware ConsultantCommented:
What are valid combinations? Why don't you turn things around, I mean: make one field with all operations that are allowed. Can you call that field "Status" or so?

You are working towards a solution right now. May I suggest you describe (in business terms) the functionality that you want? Why are those two fields there?
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

tashsmithAuthor Commented:
Unfortunately we can't have one field with all combinations as the 'delete' part of this solution is an add on and it would be too complex for us to rewrite what we already have.

We are publishing documents to three different websites and now want to rewrite our current delete process to include a field where content managers can specify which sites they wish to remove this particular document from.

Any combination is valid, as long as a value does not appear in both fields...

so, it is ok for '
published' to be set to 'live'
and
'delete' to be set to 'test,review'

but not

published' to be set to 'live, test'
and
'delete' to be set to 'test,review'




Sjef BosmanGroupware ConsultantCommented:
So something like
     @If(publish<>"" & publish<>delete; @Success; @Failure("You need to select different options")

Put this in the Validation-property of one of the fields. It will just tell the user that two different values should be selected. If multiple values can be in both fields, I think things will work.
tashsmithAuthor Commented:
getting a missing right parenthesis ')' error
tashsmithAuthor Commented:
ok  got it to work, but added that to the input validation property  of the delete field, but nothing happened...
Sjef BosmanGroupware ConsultantCommented:
Sorry, it's better to do it differently:

    p:= @Trim(@Replace(publish; delete; ""));
    d:= @Trim(@Replace(publish; p; ""));
    @If(d!=""; @Failure("You need to select different options (" + @Implode(d; ", ") + " used twice)"); @Success)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tashsmithAuthor Commented:
perfect cheers
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.