How I can ascertain "ViewContext" by programming (InfoPath C#) - InfoPath Dev
in

InfoPath Dev

How I can ascertain "ViewContext" by programming (InfoPath C#)

Last post 02-13-2008 02:24 AM by wltr-Germany. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-23-2008 02:37 AM

    How I can ascertain "ViewContext" by programming (InfoPath C#)

    Hi,

    can anyone tell me if it is possible to get the ViewContext-Value (e.g. "CTRL208") of the current data field (data field is focused) by programming (C#   e.context.????). I want to receive the value for the current data field in the procedures  "Context-Changed-Event" and in the "Changed-Event".

     
    Thank you very much for your help!
  • 01-26-2008 04:31 PM In reply to

    Re: How I can ascertain "ViewContext" by programming (InfoPath C#)

    Hi

    Yep, should be.  use the code in this web site http://enterprise-solutions.swits.net/infopath2007/retrieve-value-infopath-form-field-code.htm to achieve what you are after.

    It references your field as to its location in the data structure and its name to pull the value back.  It has both VB and c# code

    Cheers
     

    Adam Harding
    Wales
    UK
  • 02-04-2008 01:57 PM In reply to

    Re: How I can ascertain "ViewContext" by programming (InfoPath C#)

    Hi Adam,

    thanks for your answer.

    Now I would like to specify my problem further. I need the View Context Name of my data field itself  (the View Context Name you see in the properties of the data field -> section code: ViewContext:  CTRL55).

    Can I get the name "CTRL55" by programming?

    Example:

    The data field "fieldxy" with the ViewContext "CTRL55" is focused when a Context-Changed-Event occurs.

    It is possible to retrieve the name ("fieldxy") of the data field with the   "e.Context.Name"  - statement!

    Now I look for a possibility to retrieve "CTRL55".

     
    Cheers 


  • 02-13-2008 02:24 AM In reply to

    Re: How I can ascertain "ViewContext" by programming (InfoPath C#)

    Hi

    Is there a possibility to find out this?

    Cheers

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