Click or drag to resize

IRelationPassiveText Property

PassiveText The text for the passive side of the relation, e.g. SuperOffice ASA is owned by SuperOffice Sweden AB, then is owned by is the passive text

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
string PassiveText { get; }

Property Value

Type: String
String – the text for the passive part of the relation
Examples

PassiveText

This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.

VB
Dim objSO
Set objSO = CreateObject("SuperOffice.Application") 
If not (objSO is nothing) Then
    set relation = objSO.CurrentRelation          
    if relation.sourcetable = 5 then 'the source of the relation is a company
        set cont = relation.sourcerecord
        Source =  cont.name
    else 'the source of the relation is a person, and source record would be 6
        set pers = relation.sourcerecord
        Source = pers.firstname & " " & pers.lastname & " from company " & pers.contact.name
    end if
    if relation.targettable = 5 then
        set cont = relation.targetrecord
        target =  cont.name
    else
        set pers = relation.targetrecord
        target = pers.firstname & " " & pers.lastname & " from company " & pers.contact.name
    end if
    msg = Source & " " & relation.ActiveText & " " & target & vbCrLf
    msg = msg & target & " " & relation.PassiveText & " " & source & vbCrLf & vbCrLf
    msg = msg & "Relation type = " & cstr(relation.type)  & vbCrLf
    msg = msg & "Relation comment = " & relation.comment & vbCrLf
    msgbox msg,,"The current relation:"
else
    MsgBox "Unable to connect to database"
end if
Set objSO = Nothing

See Also