problem in using Eval Function - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

problem in using Eval Function

Last post 11-28-2022 07:47 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-20-2022 09:55 PM

    problem in using Eval Function

    Hello According to my previous question (https://www.infopathdev.com/forums/t/40434.aspx) about (converting separate string fields to separated emails in a text box field) and very good solution I have received I have problem in using Eval function in my form (Attached). when I use below code in field1 of my form: "substring(eval(eval(SharePointListItem_RW[contains(Matrix, Discipline2)], 'concat(xdXDocument:GetDOM("LeadManagers")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:GrantAccess/pc:Person/pc:AccountId, ";")'), ".."), 1, string-length(eval(eval(SharePointListItem_RW[contains(Matrix, Discipline2)], 'concat(xdXDocument:GetDOM("LeadManagers")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:GrantAccess/pc:Person/pc:AccountId, ";")'), "..")) - 1)" I got Error: "xdXDocument:GetDOM("LeadManagers")/dfs:myFields/dfs:dataFields/my:Matrix" does not point to a valid location path of a field or group." actually, I do not understand completely Eval Function, for example I know it is for aggregation records of a repeating table to one text box filed but I do not know 1- why i have to use two eval function 2- what is usage ".." and when I have to change that. very appreciate if you can also explain about eval function.
    Filed under: ,
  • 11-21-2022 07:57 AM In reply to

    Re: problem in using Eval Function

    I think this formula would be valid and may be what you are trying to achieve:

    substring(xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM("LeadManagers")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[contains(xdXDocument:get-DOM()/my:myFields/my:DocInfo/my:Matrix, d:Discipline2)], 'concat(d:GrantAccess/pc:Person/pc:AccountId, ";")'), ".."), 1, string-length(xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM("LeadManagers")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[contains(xdXDocument:get-DOM()/my:myFields/my:DocInfo/my:Matrix, d:Discipline2)], 'concat(d:GrantAccess/pc:Person/pc:AccountId, ";")'), "..")) - 1)

     https://web.archive.org/web/20150110023940/http://blogs.msdn.com/b/infopath/archive/2006/04/05/569338.aspx is a web archive to the original InfoPath team explaining how double eval works - hopefully that will help clarify.

    Hilary Stoupa

  • 11-23-2022 12:44 PM In reply to

    Thanks Hilary According to the attachment I have used below string for concate Display Name, but it does not work, I have checked with other fields in Repeating Table, and it was working. maybe because person/group field is a repeating table in the main repeating table, but I do not know how to solve. xdMath:Eval(xdMath:Eval(xdXDocument:GetDOM("LeadManagers")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[contains(xdXDocument:get-DOM()/my:myFields/my:DocInfo/my:Matrix, d:Discipline2)], 'concat(d:GrantAccess/pc:Person/pc:DisplayName, ";")'), "..")
    Filed under:
  • 11-24-2022 12:24 PM In reply to

    Re: problem in using Eval Function

    Hi Hillary Regarding my previous reply, and my problem in using eval function when there is a person/group inside another repeating table. I try to create a new column (text box field) in my SharePoint list and copy data from people/group to that (by workflow). now I use the Eval function you had sent to me, and it works. I would like to know this strategy for by passing of working with people/group field is, ok?
  • 11-28-2022 07:47 AM In reply to

    Re: problem in using Eval Function

    As long as you are getting the data you need, sounds fine to me.
    Hilary Stoupa

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.