문제

I have some documents who have a field called From and some of them have RFC822 Internet mail text. Its contents are displayed the document properties something like this:

Field Name: From
Data Type: RFC822 Text
Data Length: XX bytes
Seq Num: 2
Dup Item ID: 0

Field Flags: SUMMARY NAMES 

RFC822 Type: ADDRESS
RFC822 Flags: STRICT 
Native Value: 

"ABC XYZ <ABCXYZ@PQR.COM>"

RFC822 Header Name: 

"From"

RFC822 Header Delimiter: 

": "

RFC822 Header Body: 

4E 79 6A 52 19 ABC 
6F 59 6F 60 32 XYZ
...
...

In LotusScript I was able to write the following piece of code to identify if the field has RFC822 Internet mail text.

Set item = doc.Getfirstitem("From")
If item.Type = 1282 Then
    'Field has RFC822 Internet mail text
End If

But how can I check this in Formula Language? I cannot find any equivalent Formula code that would check for RFC822 Internet mail text. I am trying to identify fields of type RFC822 TEXT with the field properties shown similar to above. I need this so that I can put it into view selection formula and see all the documents in a single view.

도움이 되었습니까?

해결책

I'm not aware of any way to check the field type in formula language. Can you write a LotusScript agent to check item.Type and add a hidden field (e.g., $HasRFC822TextItems = 1), and use that for your view selection formula?

If you can't or don't want to do that, another alternative is to create a folder, and use that instead of a view. I.e., have your agent test the item.Type as above, and then use NotesDocument.putInFolder("RFC 822 Text Documents").

다른 팁

I think you can check if the item's value is in FRC822 format with this formula:

add := @ValidateInternetAddress([ADDRESS822];From) ;
x := @If( add = "" ; "RFC 822 ADDRESS" ; "OTHER ADDRESS FORMAT") ;
@Prompt([OK];"";x)

If the formula returns an empty string, the validation was successful or in other words: the value in the field From contains a valid RFC822 value.

It does not check the item's type though.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top