Create a table calculating amount of days in InfoPath form

Hello,
I am creating an InfoPath form and I want to have a table that will calculate the days needed to complete a project, it will allow the user to enter start dates and end dates and as that happens one row will have the calculated length of days it will take
to complete based on use input and it would be real-time so no need to manually press a button to update.
Here is my table for example:
The first row will be the row that has the Total project time with the start time and end time based on user input.
Is this something that can be done in InfoPath without any code? I am unable to use code so unfortunately that isn't an option.

Hi compuluv,
Based on your description, my understanding is that you want to Calculate the length between two date picker controls in InfoPath using rules and formulas - no code!
Use rules, conditions, and the number(), floor(), and
substring()   functions in formulas to calculate the difference between two date picker controls in InfoPath.
Here is an article about it, you can use as a reference:
http://www.bizsupportonline.net/infopath2007/calculate-date-difference-infopath-rules-formulas.htm
Best Regards,
Lisa Chen
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Lisa Chen
TechNet Community Support

Similar Messages

  • Creating the site content type failed when publish Infopath form to Sharepoint 2013

    I have an InfoPath 2013 form trying to publish it to SharePoint 2013.  When I click on publishing an error message appears stating "Creating the site content type failed".  I can't figure out why this
    is happening, any help on this one?
    Also it appears the form template is uploaded when I go to the library settings under advance.  When I see the .xsn file and click on it, it opens in InfoPath but not in sp.

    Rettajm, could you please find any errors in ULS?

  • Creating a table based on Category and Sub-Categories

    Hi
    I am building an extensive home budget. I have 3 tables showing, monthly, quarterly and annual costs. These tables contain Categories and Sub-Categories. I have created a table and chart to show the percentage of the total costs for each Category. For the two Categories with the largest percentage of the total cost I would like to create a table (and chart, no problem, based on my first template) showing the breakdown of the Sub-Categories. However this information is to be retrieved from 3 tables, and I was hoping to create the table automatically. If not I must individually go to each different table and find the relevant Sub-Category and manually input the text and link the cell for the value to my new table. This gives room for error in my opinion and is a nuisance as my budget file now contains about 8 sheets so even on 27" iMac requires a considerable amount of scrolling around.
    Am I expecting too much of Numbers or missing something totally? I do not have much experience of spreadsheets, just basic tables and calculations in Excel before coming over from the Dark Side!
    Many thanks for any advice
    Shirley

    Hi Barry
    Many thanks for your reply and apologies for my delay in responding.
    Hope I am doing this photo embedding correctly via Flikr:
    Page 1
    I apologise also for my incorrect terminology - please bear with me on this, unfortunately I never used Excel much so terminology is pretty much my own . I believe that I have one sheet, which then changes into different numbers of pages depending on the page size I set, so with these examples 4 pages. 14 tables and one chart at this time
    The tables on the second screenshot were the only way I could figure out how to retrieve the data for the final table and chart (% Total Monthly Expenses)
    Now what I want to do is for each (or in fact the three largest) budget categories is to give a breakdown of what in that category is, percentage wise, costing the most. Preferably, I want to get this breakdown category information automatically so that human error is ruled out (that I cannot overlook an entry in the any of the tables in my first example). Perhaps I am asking too much, but I thought it was worth asking!
    Again many thanks for responding and for your help with this
    regards
    Shirley

  • Smartforms-table-calculations tab usage............

    Hi sap gurus,
    i am designing a  smartforms in which i have created a table of data. this contains line items.
    one of the field is amount.
    a) how to sum up all the amount of each line item so as to display at the footer.
    please tell me how to use
    calculations tab in table --> to calculate the sum...
    please tell me if u r not clear about my question......
    Thanks
    krishna
    Edited by: krishna chaitanya on Mar 10, 2008 11:15 AM

    Hi,
      In smartform 
    Click on global definition>  declare one variable to collect the SUM amount.Ther in    INITIALIZATION->import parameter pass your ammount field.
    And wite code there 
    v_amount = v_amount + 1.   
    In main window  pass this amount field where you want to display

  • Per Diem Calculations for Single Day and Multiple Days

    Hi Gurus
    I have just now confronted a weird calculation of Per Diems.
    I have configured Per Diems for 1 Day say $50 per Day, irrespective of the no.of hours.
    When I create a trip for a single day, the system is calculating $50 Per DIem for one day.
    Whereas, when I create a trip for 3 days, the system is calculating only for Two days i.e, $50x2=$100 and not $150 as expected, meaning the lfirst and seond day gets calculated and the last day is not getting calculated
    Please let me know where I am missing the little configuration in order to let the system calculate for multiple days correctly ?
    This is an urgent requirement please.....Need help.
    Thank you
    RRoy

    Hi,
    As I told you earlier that there could be serval options which needs to be checked again.
    For example:
    a)  V_T702N_D
    b) Your per diem table
    I think if you have checked 24 hours in V_T702N_D , then please verify the trip duration on PR05
    If it was working earlier then below might help you...
    For Example:
    Start date/time 23-July-2011 Time 00:00
    End date/time 25-July-2011 Time 00:00
    Here above number of days are three (23,24,25) but calculation for meals shall be done for two days, because for three days per diem calculation it shall be 48:01 Hours  above is 48 Hours..
    Please try in PR05 and check the results.
    Start date/time 23-July-2011 Time 00:00
    End date/time 25-July-2011 Time 00:01
    So please check again and let know in case of problem..
    Regards,
    Muhammad Umer

  • Statements - tables for terms 30 days etc.

    HI guys and girls,
    ( I do not have an example of a STD Statement on my system)
    I am quite new to ABAP - only 7 months old , and I want to create a Statement in Smartforms.  I have drawn up all my windows where the fields must go (as you can see it's a Custom Development), and I would like to know where to find the following data fields:
    Terms for "still owe us" : current, 30 days, 60 days, 90 and 120 days.
    The Total amount owed (or balance).
    The address of the company.
    The address of the Client.
    Which table keeps the data of the Credit and Debits to create the table with all those amounts.
    It is a All in One system I'm working on - if you need that info.
    Hope you can help.  Thanx to all who share their knowledge in here.

    HI guys and girls,
    ( I do not have an example of a STD Statement on my system)
    I am quite new to ABAP - only 7 months old , and I want to create a Statement in Smartforms.  I have drawn up all my windows where the fields must go (as you can see it's a Custom Development), and I would like to know where to find the following data fields:
    Terms for "still owe us" : current, 30 days, 60 days, 90 and 120 days.
    The Total amount owed (or balance).
    The address of the company.
    The address of the Client.
    Which table keeps the data of the Credit and Debits to create the table with all those amounts.
    It is a All in One system I'm working on - if you need that info.
    Hope you can help.  Thanx to all who share their knowledge in here.

  • Creating a rate calculator [was: how do i create this?]

    I want to create a rate calculator on a website with 2 input fields: calling from and calling to.  Here is what i've got:
    CALLING FROM table:
    COUNTRY     $/MIN
    Africa            0.10
    Europe          0.20
    Asia              0.30
    CALLING TO table:
    COUNTRY     $/MIN
    Africa           0.20
    Europe         0.30
    Asia             0.50
    USA             0.10
    Basically to get the rate $/min the CALLING FROM selected country and the CALLING TO selected country will be added together i.e calling from africa to USA would be $0.20/min (0.10 + 0.10).
    - How do i create the database for this? (in access)
    - How do i then create the rate calculator in a webpage? (asp/php)???
    I would really appreciate anyone who will be able to help me in this.
    Thank you very much.
    Natalie
    [Subject line edited by moderator to indicate nature of question]

    Create a database table with 3 columns
    Country
    ToRate
    FromRate
    Populate these values as appropriate.
    Create two drop down menus on your page; FromRate and ToRate.  Populate these with the values (Display value and rate) from the table.
    Then, you could either:
    1) Submit the form to a server side script that adds and displays the values
    2) Use Javascript to add and display the values

  • How can I create a Table View in Cocoa Applescript?

    This is my last resort. I've searched for days and only found tutorials for iPhone and Cocoa, and I have no idea where to start. I'm looking for a way to create a Table View, and fill it with a few cells that call a handler when clicked. I've looked through the Xcode help, the Apple documentation, and countless tutorials, and I don't know what to do. I'm sure what I'm asking is possible, because usually what is possible in Cocoa is possible in Cocoa-Applescript.
    Perhaps something like:
    myTableView's addCell_OfType_WithHandler("This is a text cell", text, "myHandler:")
    I would appretiate any responses and brief descriptions on the matter.

    You did not answer my first question, which was not an idle question. I'll answer here, but if cross-chatter appears in a different thread I'll ignore it. You'll have to keep track of the mess yourself.
    Apple_For_The_Win wrote:
    At this point, I've dragged a Table View onto my window, in Xcode. I've connected it to the value "myTableView", and that's where I need help. I'm specifically trying to add cells into the table view.
    I'll assume that 'connected it to the value "myTableView"' means that you've control-dragged in XCode from the table view in Main Menu.xib to a property in your applescript app delegate called myTableView. If that's not the case, please correct me.
    I prefer to use an array controller for this, so please drag an array controller object into main menu.nib. once you've done that, do the following:
    open the applescript app delegate and add a new property called "tableController"
    select the table view in the object list (you may need to open some disclosure triangles to reach it). and add appropriate (an) column name(s). you can hide column titles later if you like, but having named columns makes life easier.
    select the array controller in the object list
    rename the array controller "table data"
    open the attributes inspector, and then add the column name(s) as key(s) in the object controller area
    open the bindings inspector, and where it says "controller content", open the disclosure arrow and bind the content to the App Delegate object on the model key path self.tableController
    select the table view in the object list again, then go down a level and select each column in turn
    for each column, open the bindings inspector, and where it says "value", open the disclosure arrow and bind the content to the Table Data object with the controller key arrangedObjects model key path being the name of the column (which is the name of the key in the controller as well)
    back in the applescript app delegate, add code like the following:
      -- create a list of records, where each record represents a row and the column name is the record key
      set myData to {{column_1_name:"hello"}}
      -- convert it to an NSArray and add it to the controller content. don't forget the *my* keyword, or it won't work
      set my tableController to NSArray's arrayWithArray:myData
      -- may or may not be needed
      myTableView's reloadData()
    That should populate the table with simple text. if you want something more complicated (like buttons or links) then create the more complicated elements separately and add them to the data.

  • How to create a table in SAPscript

    Hello,
    I am quite new at SAPscript, and cannot figure out how to create a table in my main window.
    I have read this forum post : Script: tabs, boxes, tables but am having problems with the way to fill in tabs, so if someone could help me understand better I would be very grateful.
    i need to create the following scenario:
    |ITEM  |MATERIAL    |QTY     |PRICE   |CURRENCY | <-Headr
    | xxxx |xxxxx       |xxxx    |xxxx    |xxxx     | <-Item
    | xxxx |xxxxx       |xxxx    |xxxx    |xxxx     | .
    | xxxx |xxxxx       |xxxx    |xxxx    |xxxx     | .
    | xxxx |xxxxx       |xxxx    |xxxx    |xxxx     | .
    | xxxx |xxxxx       |xxxx    |xxxx    |xxxx     | <-Item
                     Total Amount xxxx
    I have created a paragraph format PF with all the necessary tabs.
    1) How do I create the table and the dividing lines ?
    In the line editor I typed
    <b>/E</b> TABLE
    <b>PF</b> Item,,Material,,Quantity,,Price,,Currency
    (will these be translated when I translate the form with the SE63 transaction? Or should I put the technical name for them, for example: &BKPF-BELNR&,,&BKPF-UZEGF&,,etc   ?)
    what is the use of the <b>/E</b> TABLE ? All it does is print "/E TABLE" in my print preview... is this normal or did I forget to do something ?
    2) now in the Items, how do I input the different elements ?
    If I just type
    <b>PF</b> &BSEG-BSHL&,,&BSEG-BSGY&,,etc will I get as many lines as I have items ?
    I read on a forum that I need to type itab, but how do I syntax it so that it works with the technical info of a field?
    &itab-BSEG-BSHL& doesn't work, I get an error message saying "unknow symbol itab-BSEG-BSHL"
    Thank you in advance

    Hi Micol,
    Create a window for the below ( Header window )
    |ITEM  |MATERIAL    |QTY     |PRICE   |CURRENCY | <-Headr
    <b>In text elements of this window write this
    PH   ,,ITEM,,MATERIAL,,QTY,,PRICE,,CURRENCY
    Here PH is a paragraph format give appropriate tabs.</b>
    | xxxx |xxxxx       |xxxx    |xxxx    |xxxx     | <-Item
    | xxxx |xxxxx       |xxxx    |xxxx    |xxxx     | .
    | xxxx |xxxxx       |xxxx    |xxxx    |xxxx     | .
    | xxxx |xxxxx       |xxxx    |xxxx    |xxxx     | .
    | xxxx |xxxxx       |xxxx    |xxxx    |xxxx     | <-Item
    Assume the fields are
    Item - itab-item
    material - itab-material
    quantity - itab-qty
    price - itab-price
    currency - itab-currency
    <b>In text elements of main window write
    /E TABLE
    PI ,,&ITAB-ITEM&,,&ITAB-MATNR&,,&ITAB-QTY&
    ,,&ITAB-PRICE&,,&ITAB-CURRENCY&
    </b>
    In u r driver program
    loop at itab
    Call function 'WRITE_FORM'.
    under element take 'TABLE'
    window 'MAIN'
    endloop

  • How to create a table with more tan 20 columns

    I created a A4 landscape document to make a calendar for the next year.
    To add the date information I need to insert a table with 32 columns (name of month + 31 days). It should be possible to create a table with a over all width of 29.7 cm (consisting of 1 column of 4.9 cm and 31 columns with 0.8 cm)?
    Remark: Yet reduced all indention's (? German: Einzug) and other spacers and the size of used font of the table.

    Hello Till,
    unfortunatly Pages connot create a table with more than 20 columns. This is no question of size or place.
    But you can create two tables, set the most right border of the fist table to "no line" and align the second table (with the other 12 columns) at the right side of the first table. Now you have "one" table with 32 columns.
    I have done this with my driving book (Fahrtenbuch, um es korrekt zu schreiben and it works fine.
    Frank.

  • How to create a table with 3 inputs one of which is received from a sensor and the other 2 are constants

    i want to create a table that has 2 angles (beta and theta) that could assume values from 0 to 180º and gamma that is given from a sensor to the table at every moment... all angles depend of each other and i want a table that demonstrates that. so i can pull a data to use it in a equation. can someone help with this mess?

    alufe wrote:
    I have to make an array for each angle and connects them?
    That's one way. You end up with multiple 2-D arrays. You also could make a 3-D array to iterate through all your beta/theta arrays, calculating a gamma for each pair, if you understand arrays of multiple dimensions. You seem to indicate a major shortfalling in your math skills here, so I'll repeat, work with your teacher until you can understand the math, and then work on the programming.
    You have to know what you want to do before you can do it. In this case, you have to know what that array represents, and how (I'm talking math now) you are going to determine/represent the one set of numbers you need to work with for each experiment before you set something up in software.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Error during Creating Z table

    Dear All,
    I am trying to create Z-Table in se11 with 56 fields.Out of 56 fields, 50 fields are type of String.
    while activating the table system is giving error saying.....
    "Table contains more than 3 long string fields" and if i am giving data type Char and each field length 200 char.
    than error is "Table ZQM12_TEXT is too long (>4030)".
    Please help me.
    Thanks in Advance!!!!!!!!!
    Best Rgds,
    Shiv

    Hello Shiv,
    lets get this straight. the error message you get is that your table is too long (wide). Like it seems 4030 is the maximum amount of characters for a table unless we speak of cluster tables.
    1. So you either can reduce the number of characters of each of your (text/char/string)-fields to fit this condition, or you could reduce the number of fields until you match the condition.
    2. Since you are talking of texts which have to be printed on a smartform, i want to introduce transaction SO10 to you.
    There we can store standard texts in a SAP system. Those texts are easily maintainable on TA SO10 and fulfill everything you need you just dont need to create any new table, and so wont have problems.
    My answer nw is a bit of a general one since i dont really get what your requirement is, if i were better informed i could help the better.
    regards

  • Runtime error in Dynamic internal table with AMOUNT and Quantity Fields..

    Dear friends,
    I am attempting write a dymanic Select Statement (with joins).
    And the sleect query looks like this..
      SELECT (LT_SEL_LIST)
      INTO CORRESPONDING FIELDS OF
      TABLE <DYN_TABLE>
      FROM (LT_FROM_LIST)
      WHERE (LT_WHERE3).
    Here the into table is a dynamically created internal table..
    which is created by ...this
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = IT_OUTPUT2[]
        IMPORTING
          EP_TABLE        = DY_TABLE.
    the it_output2 contains the the fieldcatlog information of dynamically given fields :-
    like:-
           TABNAME
           FIELDNAME
           DATATYPE
           LENG
           INTTYPE
           ROLLNAME
           DECIMALS
           REFTABLE
           REFFIELD
    i mean the internal table is constructed with reference to all the bove metadata.
    Problem:- This query run fine with all the fields Except AMOUNT AND QUANTITY fields....
    When the selection list contain VBAK-NETWR or MSEG-MENGE..It throws a runtime error.
    "The data read during a SLECT access couldnt be inserted into the target field,either conversion is not supported for
    the target field's type or the target field is too short."
    after this I even tried to construct the dynamic table with CFILEDNAME and QFIELDNAME in the Fieldcatalog.
    so now my fieldcatlog looks like this:---
    LOOP AT IT_DD03L..
      IF IT_DD03L-DATATYPE = 'CURR'.
           TABLEFIELD-CFIELDNAME = IT_DD03L-FIELDNAME .
           ENDIF.
       IF IT_FIELDCAT3-DATATYPE = 'QUAN'.
           TABLEFIELD-QFIELDNAME = IT_DD03L-FIELDNAME .
      ENDIF.
           TABLEFIELD-TABNAME     = IT_DD03L-TABNAME.
           TABLEFIELD-FIELDNAME   = IT_DD03L-FIELDNAME.
           TABLEFIELD-DATATYPE    = IT_DD03L-DATATYPE.
           TABLEFIELD-INTLEN      = IT_DD03L-LENG.
           TABLEFIELD-INTTYPE     = IT_DD03L-INTTYPE .
           TABLEFIELD-ROLLNAME    = IT_DD03L-ROLLNAME.
           TABLEFIELD-DECIMALS    = IT_DD03L-DECIMALS.
           TABLEFIELD-REF_TABLE   = IT_DD03L-REFTABLE.
           TABLEFIELD-REF_FIELD   = IT_DD03L-REFFIELD.
    APPEND TABLEFIELD.
    CLEAR TABLEFIELD.
    ENDLOOP.
    Note:- this is a test code so ignore performance issues...
    Please help me with some code ...to avoid the Runtime erorr.
    Thanks,
    jeevan.

    Hi Jeevan,
    Why are moving only few fields from DD03L table to your field catalog? Why don't you use move-corresponding? The following code works for me in ECC6.0.
    data: it_dd03l type table of dd03l initial size 0,
          ls_dd03l type dd03l,
          lt_fldcat TYPE lvc_t_fcat,
          ls_fldcat TYPE lvc_s_fcat,
          ls_where(72) TYPE c,
          lt_where LIKE TABLE OF ls_where,
          lt_fld LIKE TABLE OF ls_where,
          lt_data_dy TYPE REF TO data.
    field-symbols: <ft_data> TYPE STANDARD TABLE.
    select * into table it_dd03l from dd03l
        where tabname = 'VBAK'
          and ( fieldname = 'VBELN' or fieldname = 'NETWR' ).
    check sy-subrc eq 0.
    loop at it_dd03l into ls_dd03l.
      move-corresponding ls_dd03l to ls_fldcat.
      append ls_fldcat to lt_fldcat.
      move ls_dd03l-fieldname to ls_where.
      append ls_where to lt_fld.
      if ls_dd03l-fieldname = 'VBELN'.
        clear ls_where.
        concatenate ls_dd03l-fieldname ' <> ''''' into ls_where.
        append ls_where to lt_where.
      endif.
    endloop.
    check not lt_fldcat is initial.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
          EXPORTING
            it_fieldcatalog           = lt_fldcat
          IMPORTING
            ep_table                  = lt_data_dy
          EXCEPTIONS
            generate_subpool_dir_full = 1
            OTHERS                    = 2.
        IF sy-subrc <> 0.
          RAISE no_configuration_data.
        ENDIF.
        ASSIGN lt_data_dy->*  TO <ft_data>.
    check sy-subrc eq 0.
    select (lt_fld) from VBAK into corresponding fields of table
        <ft_data>
        where (lt_where).
    Thanks
    Bala

  • Plese Help...i have to create a table dynamically using JSP

    Hi all,
    Depending upon what user fills as year & month I have to create a table dynamically.The table should look like this...
    DAY     S     M     T     W
    DATE     1     2     3     4
    Name1     -     -     -     -
    Name2     -     -     -     -
    I know how to get total no available days of any month so i'll use for loop to create <tr>
    The info i need is-
    How to get the first day of the month ,the user entered using calendar because the first row should start with it.
    and the second thing is...
    How to keep incrementing it in the loop..like after sun-->mon-->tue....sat-->sun....
    & also..sat & sun cols should be of different colors than other weekdays
    Please help me.

    Sounds like you already knows about the Calendar class. You should use that class to get the first day of the month.
    Kaj

  • Can't Create a Table on Hosted ApEx Site.

    I have been trying all day to create a table in the hosted sandbox environment for ApEx at http://htmldb.oracle.com/pls/otn/htmldb. However, whenever I get to the last page in the wizard and click the Create button, I get a message that says that the connection has been reset. Any ideas?
    Also, if I try to just run it as a script, it launches a window with a single Submit button on it but, clicking it does not appear to have any effect. The table never gets created.
    -Joe

    It can't be a quota issue. I dropped all the sample tables from the workspace. I tried to create another table (in FireFox) and, as always, I get:
    The connection was reset
    The connection to the server was reset while the page was loading.
    * The site could be temporarily unavailable or too busy. Try again in a few
    moments.
    * If you are unable to load any pages, check your computer's network
    connection.
    * If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.
    In IE, I get "The page could not be found"

Maybe you are looking for