• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

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.


0
tashsmith
Asked:
tashsmith
  • 5
  • 4
1 Solution
 
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?
0
 
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.
0
 
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?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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'




0
 
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.
0
 
tashsmithAuthor Commented:
getting a missing right parenthesis ')' error
0
 
tashsmithAuthor Commented:
ok  got it to work, but added that to the input validation property  of the delete field, but nothing happened...
0
 
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)
0
 
tashsmithAuthor Commented:
perfect cheers
0
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.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now