View Selection formula

Hi! All

I am facing problem with selectin formula in the view.

let say I have five docuents in which there is field named keyskills

in the first document it contains : Java, Lotus, Portal

in the second document it contains : Project Manager, Team Leader, HR-Manager

in the third document it contains : Project Manager, Lotus, CRM

Now I want to select those which contains Java

then my result would be only one doument

If I want to view Project Manger then my document would be 2 result.

If I pass Java, Project Manager, Lotus then my document would be all these three.

I used @keywords like

SELECT ((Form = “UserRegistration”)) & keyskills = @Implode(@Keywords(“Project Managers, Java”;keyskills);“,”);

it doesn’t return any document

Pls some body help me if any one have idea about this functions or is there any other functions

With Regards,

Vikas K Sinha

Subject: View Selection formula

Vikas,

Why not use @IsMember?

SELECT Form=“UserRegistration” & (@IsMember(“Java”;keyskills) | @IsMember(“Project Managers”;keyskills)

Mike

Subject: RE: View Selection formula

Hi Mike,

Thanks for u r kind support, Actually set this view selection formula at run time via agent and all the word like “Java”, “Project Manager” or “Manager” get from a field so we can’t fix it.

If u have some other way I will be very thank ful to u.

With Regards,

Vikas

Subject: RE: View Selection formula

What difference would that make?

You can still build the selection formula in any way you like. Nothing keeps you from building the string as Mike suggested.

Subject: RE: View Selection formula

Or (even shoreter):

SELECT Form = “UserRegistration” & (“Java”:“Project Managers” *= keyskills)

Subject: RE: View Selection formula

Nice solution!

Thanks for that Harkpabst

Subject: RE: View Selection formula

Thanks Harkpabst,

I don’t know why this formula not working it returns only when its sequence match then it return it document. even it I use

& (“Lotus Domino”:“Asp.net” *=keyskills) it not return any value but if i use

& (“Lotus Domino, Asp.net” *=keyskills)

Then it result only this document

Subject: RE: View Selection formula

Well, for sure it does. The keyskills you are asking for must be presented as a list, not as a string.

If the field you read those values from in your agent returns a String like “Lotus Domino, Asp.net”, simply use something like

Replace(fieldValue, ", ", “:”)

Subject: RE: View Selection formula

Thanks Harpabst,

Now its working fine…

One more query I have if you can help me. I have a fomr name Job Posting and there is a field named briefdesciption. it is richtext field. Now I would like to view the content of this field to another form. what I have to do. I used dblookup but it is notworking. pls give some your experienced Idea if you can.

Again thanks for your previous suppor.

With Regards,

Vikas K Sinha

Subject: RE: View Selection formula

Hey Vikas

You must know that @dblookups can never be used to lookup rich text fields and neither can RTFs be displayed in views.

To show the text of an RTF in another document - you will have to use LotusScript.

However - if you can enable inheritance in the second form then it will be much simpler.

HTH

A

Subject: RE: View Selection formula

Thanks Arshad for your kind response

I Know dblookup can’t works for richtext. but could you provide me some code how to use lotus script to retrive the content in richtext fields and what are the settings i have to do please.

With Regards,

Vikas K Sinha

Subject: RE: View Selection formula

Vikas,

You need to look at the NotesRichTextItem class in Designer Help

Mike

Subject: RE: View Selection formula

Thanks all now its working find, I used “Formula Inherits from selected document”.

I m very thank ful to all of you for your kind and helpful support.

With Respect,

Vikas K Sinha

Subject: RE: View Selection formula

“I Know dblookup can’t works for richtext.”

This is actually not 100% correct. @DbLookup can return RichText content. It can even return it into text fields …

_mode := “Notes”:“NoCache”;

_source := “”;

_view := “RichTextLookupSources”;

_key := Key;

_field := “Body”;

@DbLookup(_mode; _source; _view; _key; _field; [FailSilent])

This works as value for a computed RichtText or Text field (it even does for an editable Text field) if RichTextLookupSources contains documents, that hold RT items called Body.

But: There are a number of issue.

In Notes client: No simple way to refresh, must use Andre’s hopefully well known technique to close and reopen the document in front-end without saving.

32k size limit when used in Text fields, 64k size limit when used in RichText fields

In Web browser: Images don’t show up, just (formatted text).

Refresh only works with Text fields, not RichText fields.

Same 32k limit as in Client.

So, while you might just get away with @DbLookup sometimes, it’s probably safer to look into the NotesRichtext class, NotesDocument methods to copy items and maybe form inheritance.

Subject: View Selection formula

you can try using @Contains if your keyskills is a list.

SELECT ((Form = “UserRegistration”) & @Contains(keyskills; “Project Managers” : “Java” : “Lotus”));

Subject: RE: View Selection formula

Dear Fin,

First of all thanks for your kind support. Now but what I want is

If I use this code in which instead of “Project Manager” i use “Manager” It also return the Project Manager Document and same if I use Lotus it return those document which contains “Lotus Domino” where as I wanted to return exactaly those document which after comma a single word is treated

Thanks,

Vikas

Subject: RE: View Selection formula

in such case, you should use @IsMember as per Mike’s suggestion.