InfoPath表单当前用户位于SharePoint列表中从列表中获取Loggedin用户的ID [英] InfoPath form Current User is in a SharePoint List get the ID of the Loggedin User from the List

查看:104
本文介绍了InfoPath表单当前用户位于SharePoint列表中从列表中获取Loggedin用户的ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法弄清楚如何将当前登录的用户与SharePoint列表中的名称进行比较。



我只是想得到当前登录用户 如果他们在SharePoint列表中,则在列表中获取他们的ID#。

I can not seem to figure out how to compare the current logged in user to names in a SharePoint list.

I just want to get the current logged in user  if they are in a SharePoint list, to get their ID # in the list .

如果Billy Bob 是我想要返回的列表中的第5个人  5

SO if Billy Bob  is the 5th person in the list I want to return  5

如果Emmylou Hayes是列表中的第3个人我想要返回3



如果当前登录的人是不在列表中,然后IsAdmin文本框为空。

If Emmylou Hayes is the 3rd person in the list I want to return 3

If the current logged in person is NOT in the list then the IsAdmin text box is empty.

在我的InfoPath表单中我有CurrentUser(使用不同的方法,然后用户名() )和ISAdmin(数字)



如何设置规则来执行此操作?



因为我可以获得当前用户...但是当我试图从SharePoint列表中获取信息是问题。

in my InfoPath form I have CurrentUser (uses a different method then username() )and ISAdmin (Number)

How would I setup a rule to do this?

As I can get current user... but when I try to get the info from the SharePoint list is the issue.

我的管理员列表栏目:

ID(默认SPS ID#)

UserAccount   =名称(有在线状态)

My AdminUsers List Columns:
ID (default SPS ID#)
UserAccount   = Name (With Presence)

ISAdmin =是(文本)

ISAdmin = Yes (Text)

我们目前正在使用InfoPath Web表单,在此我们无法使用  userName()。

We are currently using a InfoPath Web form, which here we can not use  userName().

我实际上可以使用上一个当前用户登录当前用户。

I can actually get the current user logged in using the previous person current user .

当我去创建规则时:

When I go to create the rule:


  1. 选择功能区中的 DATA 标签
  2. 规则 部分,点击 表单加载 按钮
  3. 创建新的 操作 规则,并将其命名为 分配管理员用户
  4. 接受默认 条件  - 无 - 在打开表单时运行规则
  5. 创建新的  设置字段值 操作:
  1. Select the DATA tab in the ribbon
  2. In the Rules section, click on the Form Load button
  3. Create a new Action rule and name it Assign Admin Users
  4. Accept the default Condition - None - Rule runs when form is opened
  5. Create a new Set a field's value action:

  1. 字段: IsAdmin
  2. 对于 ,请点击 fx 按钮
  3. 点击 插入字段或组
  4. 点击 显示高级视图
  5. 更改数据来源 GET-ElevatedPermissionsUsers
  6. dataFields 下,向下钻取选择 ID
  1. Field: IsAdmin
  2. For Value, click on the fx button
  3. Click Insert a Field or Group
  4. Click on Show advanced view
  5. Change the data source to GET-ElevatedPermissionsUsers
  6. Under dataFields, drill down and select ID


这里是我迷路的地方。

here is where I get lost.

我接下来要做的事情是b $ b点击 过滤数据

点击 添加

在第一个下拉框中更改 ID 并点击
选择一个字段或组...


在数据源对话框的 dataFields ,向下钻取并选择
AdminUser AccountID

(这就是我在哪里得知哪些数据指向))


Next thing I do is
Click Filter Data
Click Add
In the first drop-down box change ID and click Select a field or group...
On the Data source dialog, under dataFields, drill down and select AdminUser AccountID
(THIS IS WHERE I GET CONFUSED AS TO WHICH DATA TO POINT TO)


  • 点击 确定
  • 接受默认值第二个下拉列表: 等于
  • 从第三个下拉菜单中选择使用套管...
  • 插入公式 对话框中,单击midd le按钮
    插入功能...
  • 选择 userName 功能然后点击 确定  

    如果我需要指向另一个,我不确定此处的表格 获取用户当前记录的数据源。

  • Click OK
  • Accept the default in the second drop-down: is equal to
  • From the third drop-down, select Use a fornula...
  • On the Insert Formula dialog, click the middle button Insert Function...
  • Select the userName function and click OK 
    I am not sure form here on if I need to point to the other  Datasource that gets the Currentlogged in user.

我可以使用:
$

in my InfoPath form I am able to use :

这给了我与username()相同的信息。但我使用不同的数据源来获取此信息。

当前用户文本字段保存当前用户登录页面:

this gives me the same info as username() does. but I am using a different datasource to get this info.
the current user text field holds the current user logged into the page:

这是结果:

我甚至没有应用规则或任何东西..仍然试图让IsAdmin tet框保存登录到表单的人的ID,如果他们在AdminUsers列表中。

this is the result:
I have not even applied the rules or anything.. still trying to get the IsAdmin tet box to hold the ID of the person that is logged in to the form if they are in the AdminUsers List.

 有人可以帮忙吗?这个问题?

 Can someone please help with this issue?

推荐答案

牛仔2066,

Hi cowboy2066,

请将"AccountId"更改为" DisplayName"在表单加载规则中:

Please change the "AccountId" to "DisplayName" in the Form Load rule:

祝你好运,

Grace Wang

Grace Wang


这篇关于InfoPath表单当前用户位于SharePoint列表中从列表中获取Loggedin用户的ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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