in

InfoPath Dev

Saving a field back to a data asource(Access)

Last post 09-27-2007 11:18 AM by m181354. 23 replies.
Page 2 of 2 (24 items) < Previous 1 2
Sort Posts: Previous Next
  • 09-26-2007 08:55 AM In reply to

    Re: Saving a field back to a data a source(Access)

    I am trying to get a Total Line (NOW_ETC_HRS_USER_INPUT_TOTAL) from a Repeating table and update one row (NOW_ETC_HRS) that has Summary information for the same Control Account record on an Access database table.

    Below is the line that updates the NOW_ETC_HRS field but also updates every row in the table...

    <xsf:calculatedField target="/dfs:myFields/dfs:dataFields/d:LaborSummary/@NOW_ETC_HRS" expression="../../../my:FormData/my:NOW_ETC_HRS_USER_INPUT_TOTAL[../../my:DetailId = ../../dfs:dataFields/d:LaborSummary/@AUTONUMBER]" refresh="onChange"></xsf:calculatedField>

    I have tried the following filters...

    ../../my:DetailId - used to store the AUTONUMBER from the row to switch views. 

    Looks like this - "/dfs:myFields/dfs:dataFields/d:LaborSummary[../../my:DetailId]/@NOW_ETC_HRS"

    or

    ../../dfs:dataFields/d:LaborSummary/@AUTONUMBER - contains the row number.  

      Looks like this - "/dfs:myFields/dfs:dataFields/d:LaborSummary[../../dfs:dataFields/d:LaborSummary/@AUTONUMBER]/@NOW_ETC_HRS"

     

    In my test, I am trying to update row number 2 which works when I hard code the number but I will need to update any number of rows in production

  • 09-26-2007 09:12 AM In reply to

    Re: Saving a field back to a data a source(Access)

    Ok.

    1 thing would be to double check detailID is 2 or has the proper value. I am assuming so but always a good thing to check when debugging.

    I think what you need is the full name for the DetailID field.  the ../../ is relative to the positino and for the filter you may need /dfs:myFields/my:DetailID although I think you may have one more group inbetween but try putting in the full path on the target filter.

  • 09-26-2007 09:34 AM In reply to

    Re: Saving a field back to a data a source(Access)

    When I add   /dfs:myFields/my:DetailID  as the filter my default value is removed on the NOW_ETC_HRS field.  I have it getting its value from the NOW_ETC_HRS_USER_INPUT_TOTAL field.   

    My DetailID value is correct.

    I think /dfs:myFields/my:DetailID   is the right syntax but I do not know why the default value is removed from my NOW_ETC_HRS field after I make the change to the manifest file.

  • 09-26-2007 11:51 AM In reply to

    Re: Saving a field back to a data a source(Access)

    Apparently until I get the syntax right it will not work...but I have tried a dozen different ways. Is there a way I can get someone to help me get the syntax right?  The field with the row number in it shows up on he form correcly...I hope it is getting passed the way I think it is.

    <xsf:calculatedField target="/dfs:myFields/dfs:dataFields/d:LaborSummary/@NOW_ETC_HRS" expression="../../../my:FormData/my:NOW_ETC_HRS_USER_INPUT_TOTAL[../my:DetailId2 = ../../dfs:dataFields/d:LaborSummary/@AUTONUMBER]" refresh="onChange"></xsf:calculatedField>

    Filed under: , , ,
  • 09-26-2007 11:59 AM In reply to

    Re: Saving a field back to a data a source(Access)

    Could I email someone what my data sources look right so I can get the right syntax?  The row number is stored in @AUTONUMBER, DetailId or DetailId2.

    Filed under: ,
  • 09-26-2007 12:09 PM In reply to

    Re: Saving a field back to a data a source(Access)

    Under the options Tab when replying you can attach your XSN or any other files.  Sample to look at might help.

  • 09-26-2007 12:39 PM In reply to

    Re: Saving a field back to a data a source(Access)

    I have included my Manifest and 4 shots of my Data Source.  Thanks again for all of your help!  I am trying to get go into producrion asap and this is the last thing to get working.

  • 09-26-2007 12:40 PM In reply to

    Re: Saving a field back to a data a source(Access)

    The manifest is attached.

  • 09-27-2007 11:18 AM In reply to

    Re: Saving a field back to a data a source(Access)

    Was having the Data Source and manifest helpful to solve the problem?

    Filed under: ,
Page 2 of 2 (24 items) < Previous 1 2
Copyright © 2003-2007 Qdabra Software. All rights reserved.
View our Terms of Use.