Formatting rules on repeating table fields - InfoPath Dev
in

InfoPath Dev

Formatting rules on repeating table fields

Last post 07-08-2013 07:58 AM by Megan Witham. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-07-2013 07:26 AM

    Formatting rules on repeating table fields

    I have a form with a repeating table that I have showing in different ways on multiple views. The idea is to have certain fields of that repeating table hidden depending on who is logged into the form from our SharePoint site. I have used the username() to validate who is logged in and it works up to the 5th allowed condition in the rule---if I add a second rule to cover the 6th person it breaks. I have also tried using the "The expression..." option in the rule dropdown to include all six conditions but this does not seem to work either. I have tried all variations of AND/OR in the rules and using AND is the only one that works--but again only up to that 5th condition.

    Are there known bugs with setting formatting rules using the username()? Are there known bugs with setting formatting rules on repeating tables/fields?

    These are examples of the rules I have set in the past that do not work after a certain point---

    AccountId is not equal to concat("companyName\", translate(userName(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz"))

    and

     my:candidateName/pc:Person/pc:AccountId != concat("companyName\", translate(xdUser:get-UserName(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")) and my:projectLeader/pc:Person/pc:AccountId != concat("companyName\", translate(xdUser:get-UserName(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")) and my:prjLvL3/pc:Person/pc:AccountId != concat("companyName\", translate(xdUser:get-UserName(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")) and my:SSM/pc:Person/pc:AccountId != concat("companyName\", translate(xdUser:get-UserName(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")) and my:contractsAdmin/pc:Person/pc:AccountId != concat("companyName\", translate(xdUser:get-UserName(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")) and my:GMVP/pc:Person/pc:AccountId != concat("companyName\", translate(xdUser:get-UserName(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz"))

     Any suggestions would be appreciated!

     Thanks!

    Megan

  • 06-10-2013 07:46 AM In reply to

    Re: Formatting rules on repeating table fields

    Hi - I don't know of any bugs around userName() in particular. Your expression looks correct - I don't see anything obvious there. Does it fail regardless of which condition is last? That is, can you remove the one for my:SSM and it works?

    Hilary Stoupa

  • 07-08-2013 07:58 AM In reply to

    Re: Formatting rules on repeating table fields

    I was able to get this working most of the time---I had to update a few "and" and "or" options. What I am finding now is that when formatting rules based on a filter (If Column 1 equals Yes then hide), the row will still show but as soon as you hover over it, the row disappears. Looks to be a delay in the form loading or processing.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.