我有一个Infopath表单,我想将当前用户与列表中的名称进行比较 [英] I have a Infopath form and I want to compare the currentuser to a name in a list

查看:60
本文介绍了我有一个Infopath表单,我想将当前用户与列表中的名称进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够比较当前用户是否在管理员用户列表中。



如果当前用户在列表中,则允许保存按钮处于活动状态。如果当前用户不在用户列表中,则禁用保存按钮。

I want to be able to compare if the current user is in the admin list of users.

If the current user is in the list then allow the save button to be active. if the current user is not in the list of users then disable the save button.

但由于某种原因,我无法弄清楚如何获取当前用户( 用户名()) 要与列表中的名称进行比较?

But for some reason I can not figure out how to get the current user ( username() )  to be compared to the names in the list?

如果让列表中有用户ID更容易进行比较,我可以设置它。



我真的需要一种方法来比较



CurrentUser = Admin(列出名称列号)

$
如果是
CurrentUser≠Admin  (然后隐藏按钮)

If it is easier to have the list have the userID in it to do the compare I can set that up.

I just really need a way to compare

CurrentUser = Admin (List Column with names)

if the
CurrentUser ≠ Admin  (then hide the button)




推荐答案

您好cowboy2066,

Hi cowboy2066,

我们可以使用下面的用户配置文件服务获取当前用户名在InfoPath中。

We can use User Profile Service below to get the current user name in InfoPath.

http://< Your Web App> / _ vti_bin / UserProfileService.asmx

http://<Your Web App>/_vti_bin/UserProfileService.asmx

有关更多详细信息,请参阅以下文章。

For more detailed information, refer to the articles below.

使用SharePoint中的基于声明的身份验证自动填充InfoPath中的用户信息 - 第1部分,共3部分

Auto Populate User Information in InfoPath with Claims Based Authentication in SharePoint – Part 1 of 3

https://spvee.wordpress .com / 2013/04/10 / auto-populate-user-information-in-infopath-with-claim-based-authentication-part-of-of-3 /

使用SharePoint中的基于声明的身份验证自动填充InfoPath中的用户信息 - 第3部分

https://spvee.wordpress.com/2013/04/10/auto-populate-user-information-in-infopath-with-claims-based-authentication-part-2-of-3/

使用SharePoint中的基于声明的身份验证自动填充InfoPath中的用户信息 - 第3部分  3

https://spvee.wordpress.com/2013/04/10/auto-populate-user-information-in-infopath-with-claims-based-authentication-part-3 -of-3 /

祝你好运,

Sara Fan


这篇关于我有一个Infopath表单,我想将当前用户与列表中的名称进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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