如何在显示亲爱的用户之前检查其他字段 [英] how to check other fields before displaying dear user

查看:80
本文介绍了如何在显示亲爱的用户之前检查其他字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用vb脚本,并有一个简短的脚本来检查列表中的名称,如果它是空白显示亲爱的用户。我如何让它检查其他字段liek姓氏等信息显示亲爱的用户我对vp脚本知之甚少这是脚本





如果Contact.Field(Name)=那么

document.write(亲爱的用户)

Else

document.write(亲爱的&Contact.Field(名称))

结束如果

im using vb script and have a short script to check for names in a list and if it is blank display dear user. How do i let it check other fields liek surname ect for info before it displays dear user i have very little knowledge in vp script this is the script


if Contact.Field("Name") = "" Then
document.write("Dear user")
Else
document.write("Dear " & Contact.Field("Name"))
End If

推荐答案

完全相同。在创建输出之前检查可能相关的所有字段,例如:



Exactly the same. Check all the fields that may be relevant before creating the output, somthing like:

If NAME = ""
    If SURNAME = ""
        WRITE "Dear User"
    Else
        WRITE "Dear " + TITLE + " " + SURNAME
    End If
Else
    WRITE "Dear " + NAME
End If


这篇关于如何在显示亲爱的用户之前检查其他字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆