How to achieve modulus operation in infopath 2013

Hi,
My difference field calculates difference between the start date of the Employee and today's date and the result is in number of days. 
To convert it to months i divide the result by 30. But get a weird number when divident is in single digit. 
Can we have a modulus kind of operation in Infopath ?
thank you.

Hi, Victoria,
Many thanks for your response. 
I tried to use the approach suggested by Teylyn in the blog, but it didn't work for me. I wanted to calculate the difference between the two dates and referred to this blog: 
http://www.bizsupportonline.net/infopath2007/calculate-date-difference-infopath-rules-formulas.htm 
I could get the difference in days, but i wanted to convert it in months so i thought i could divide it by 30 using modulus operation. I tried what was suggested in the blog on the difference field, but didn't work. The result was something like -0.234789065748E-1. 
So i'm currently doing a round() operation of the [difference / 30] in Infopath form and with the help of rules, if the difference is >29 i divide the difference by 30 and take round figure and append months as suffix and if difference is < =29, the
difference is given as is and i suffix days ahead of that.
The above solution suggested by Teylyn may be correct in other cases. I couldn't test if it works for other scenarios. If it does, kindly mark it as answer. I will try to test it for other scenarios in the meantime.
Thanks again. 
Best Regards,
Prajk

Similar Messages

  • How to achieve logical operator on [Authorize(Roles = ] in MVC

    For example, I need to make a controller accessible a user with two roles; role "Admin" and "Editor". How to achieve it.
       [Authorize(Roles = "Admins")]
        public class SampleController : BaseController
    How to do logical operator, such as AND and OR (maybe || and &&)
    Thanks!
      

    Hello klouapple,
    Please post your question to ASP.NET forum instead of here.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to insert repeating section in InfoPath 2013?

    Hi
    I have customised SharePoint 2013 online list form using InfoPath 2013. I want to add two date fields in repeating section. But I am not able to convert general section to repeating section.
    Isn't it possible for SP list to use repeating section just for few fields?

    Hi Pratima,
    Per my knowledge, there is not a way to add repeating section when clicking ‘Customize form’ with InfoPath.
    As a workaround, you can create a blank form and customize the form based on your requirement, then submit the form into a SharePoint list.
    More information, please refer to the links:
    http://blogs.msdn.com/b/infopath/archive/2007/03/26/submitting-to-a-sharepoint-list.aspx
    http://www.bizsupportonline.net/blog/2008/12/5-ways-to-submit-an-infopath-form-to-a-sharepoint-list/
    As this issue is related to SharePoint 2013 Online, you can also create a new thread on Office 365 forum, more experts will assit you with SharePoint 2013 Online.
    Office 365  forum:
    http://community.office365.com/en-us/f/default.aspx
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to find the date and time difference in InfoPath 2013?

    Hi All,
    My date and time format is like: 2013-12-24T10:47:38 and have three fields Start date, End date and Actual time taken.
    If start date and end date filled then actual time taken field should automatically should fill, for example 2 days 12 hours 48 min 3 sec.
    How to achieve this?

    Hi Sam,
     I believe we had discussed the same issue in the below thread. Can you please refer the below one?
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d93e16ff-c123-4b36-b60b-60ccd34f6ca7/calculate-time-differences-in-infopath?forum=sharepointcustomizationprevious
    If it's not helping you please let us know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • How do I use infopath 2013 with visual studio 2013 to modify forms with code?

    Dear all,
    I am using sharepoint online and infopath 2013, I wonder how do I edit infopath 2013 forms with visual studio? When I try to edit form code it says  I need visual studio 2012 and some other tools, I installed them and visual studio 2013, I wonder how
    do I get rid of the message and start coding? Can someone provide a detailed procedure of doing so? I am having trouble with creating multiple items with single infopath form with repeating table on sharepoint online. Thanks.
    Timothy

    Hi,
    According to your post, my understanding is that you want to create InfoPath form with code using Visual Studio.
    More information about develop InfoPath form with Visual Studio:
    http://msdn.microsoft.com/en-us/library/office/ee526362(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/office/aa942693.aspx  
    For the second question, I suggest you can create another post , it will be easier for others to focus on one question in one thread.
    Best regards

  • How to add one textbox value into another textbox value every month in a list of infopath 2013

    InfoPath 2013.
    I have created a list in which I placed 2 textboxes.
    I have one textbox named Paid Amount:
    Second textbox named Invoice Amount:
    I want when I add any amount in Invoice Amount textbox in every month it Add into
    Paid Amount textbox
    How I can do this ?
    for e.g:
    Paid Amount : 2
    Invoice Amount: 3
    Paid Amount = 5
    When enter next month 6 in Invoice Amount the
    Paid Amount turn into 11.

    You can apply formula using a rule by creating a hidden field and calculate the values. Refer to the following posts for more information
    http://office.microsoft.com/en-in/infopath-help/add-subtract-multiply-and-divide-values-HP001096532.aspx
    https://support.office.com/en-us/article/Add-rules-for-performing-other-actions-5322d726-b787-4e5f-8d37-ba6db68b451d?ui=en-US&rs=en-US&ad=US
    and for complex calculations using code, refer to the following posts
    http://www.infopathdev.com/forums/p/21500/74297.aspx
    http://drekendrop.blogspot.in/2011/03/infopath-2010-get-and-set-value-of.html
    Cheers,

  • How to achieve multiple hirearcy structure using RBS feature in Project server 2013

    HI,
    How can we achieve multiple hirearcy structure using RBS feature in Project server 2013?
    The below is the screen shot of hirearcy.
    GM
    DGM
    AGM
    CM
    Officers
    There are different departments and one AM may handle 4 or more department. How to achieve this permission levels so that GM can see all departments officers created project, same with other levels
    Thanks,
    Sunitha

    Hi Sunitha,
    You could populate the RBS lookup table with 2 levels (department and sub department). Then configuring correctly your
    security categories based on the RBS, the resources in the 1st level (departments) will see projects from all theirs sub departments.
    Some more references:
    http://aboutmsproject.com/project-server-securitypart-1/
    http://ntrajkovski.com/2012/06/04/the-rbs-lookup-table-in-ms-project-server-2010/
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

  • How to achieve Multi-Tenant in Lync Server 2013 Enterprise Edition

    Hi,
      As LHPv2 is discontinued, is anyone has idea how to achieve Multi-Tenant in Lync Server 2013 Enterprise Edition?
    e.g users from different tenants should not be able to communicate unless it is allowed either by federation or any other form.
    J.B.Patnaik

    once a Topology has been published you can not change the FQDN.
    Also you can refer shah-Khan answer, it will be helpful for you
    http://social.technet.microsoft.com/Forums/lync/en-US/47d4e101-4f7b-4115-8f44-897eb5410acb/need-to-change-a-published-fqdn-lync-pool-for-lync-enterprise-2010?forum=ocsplanningdeployment
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical | Twitter:
    Mai Ali

  • Auto populate Infopath 2013 fields after selecting a specific dropdown option.

    Auto populate Infopath 2013 fields after selecting a specific dropdown option.
    Hi.
    I have a Sharepoint 2013 list with three fields. Code, Section and Sub Section.
    I would like to be able to have the form autopopulate the Section and Sub Section fields when a value for code is entered.
    How would I go about this please?
    Thanks
    Jon

    Hi JonMorgan,
    Based on your description, my understanding is that you want to achieve that the second dropdown gets populated depending on what the first dropdown is set to.
    To achieve your requirement, creating cascading dropdown fields with InfoPath.
    Please refer to the following links about cascade drop down in InfoPath form:
    http://msreddysharepoint.blogspot.in/2012/12/infopath-2013-web-browser-creating.html
    http://www.pointbeyond.com/2011/11/20/cascading-dropdowns-in-infopath-2010/
    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

  • Infopath 2013/REST Web Service - XML Data format

    I've created an Infopath 2013 form and connected it to an existing REST Web Service. The form connects successfully, but I can't get to the nodes that contain the actual data. The REST results look like this:
    <wddxPacket version='1.0'>
    <header/>
    <data>
    <struct>
    <var name='MIDDLENAME'><string>S</string></var>
    <var name='FIRSTNAME'><string>John</string></var>
    <var name='UID'><string>jdoe</string></var>
    <var name='EMAIL'><string>[email protected]</string></var>
    <var name='DEPARTMENT'><string>IT ADMINISTRATION</string></var>
    <var name='TITLE'><string>Director</string></var>
    <var name='LASTNAME'><string>Doe</string></var>
    </struct>
    </data>
    </wddxPacket>
    When I connect to the web service in InfoPath, here is what I see:
    Notice that when we expand the tree, it only shows the "struct" node. How do I get down to the actual data fields?
    Thanks in advance.
    cflbasser

    Hi cflbasser ,
    According to your description, my understanding is that you want to query data using rest web service in InfoPath 2013.
    For achieving your demand, please refer to the blog:
    http://johnliu.net/blog/2012/4/26/infopath-2010-query-using-the-rest-interface.html
    http://sharepointlessons.blogspot.com/2013/09/infopath-and-sharepoint-web-services.html
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to remove these items from Infopath ribbon in web enable form?

    Hi All,
    I am using custom list form customized in infopath 2013, I want to remove these items from ribbon :
    I tried with Infopath  "form Options" like:
    But still showing "Picture-1" options. How to remove those items from ribbob?

    Hi,
    I understand that in the list view web part, you wanted to remove the ribbon of InfoPath form.
    There are to mothed to achieve it:
    Open the list, click new item, edit page, edit web part, unclick the ‘Show InfoPath Ribbon or toolbar’ box, the new item page will remove the riibon.  Then when you open the page which has the list view web part, the ribbon of InfoPath form will also
    be removed.
    Open the page which has the list view web part, edit page, edit the list view web part, unclick the ‘Show InfoPath Ribbon or toolbar’ box, the ribbon of InfoPath form in the web part will be removed. Then when you open the list, the ribbon of InfoPath form
    will also be removed.
    The two method edit the same page newifs.aspx, so the list and the webpart will be modified in the same time.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Auto Numbering in InfoPath 2013

    Hello,
    I am brand new to InfoPath.  I was trying to follow some videos and tutorials I found on auto-numbering a field in a form. I had a hard time following because it seems there are slight nuances between versions, and 2013 acts and looks different
    than the tutorials I found. For instance when assigning a value to a field like max(@ID) + 1,  whenever I use the @ sign I get an error in the formula.  Does anyone have a complete InfoPath 2013 'how to' create an auto-number
    field on a form?  Thanks 

    Hi,
    Depend your description, you want to get some information about how to create an auto-number field via InfoPath 2013.
    The steps below about how to create an auto-number field are that I have operated in my InfoPath 2013, and you can follow it:
    Create a custom list, named "Auto".
    Create a column in that list, type number, named "Auto No.".
    Clicked List -> Customize Form and edit default form in InfoPath.
    Clicked Data -> Data Connections -> Add in InfoPath.
    In "Data Connection Wizard", set New Connection to Receive Data -> SharePoint library or list -> set URL of my "Auto" list -> only select ID column  -> checked "Automatically retrieve data when form is opened"
    In InfoPath design view, right click "Auto No." text box -> Properties -> Default Value -> fX button -> Insert Function -> Math -> Max -> OK -> double clicke on the formula to select field -> Show advanced view ->
    in "Fields" drop-down choose secondary data source (named as my "Auto" list) -> selecte 'ID' node in 'dataFields' -> OK -> back in formula type '+ 100' (so the whole formula is like: 'max(ID) + 100')
    Publish it to SharePoint list.
    Here are the links about the details of creating an auto-number field, and you can take a look:
    https://3dcios-web.sharepoint.com/delong/Lists/Posts/Post.aspx?ID=8
    http://www.sharepointsharon.com/2011/11/infopath-2010-reference-filename/
    Thanks,
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Read-only textbox and/or disable buttons in Infopath 2013

    In a InfoPath 2013 custom list form, my requirement is to make textboxes read-only, disable buttons, and/or create new buttons so users can not update fields in a custom list once the user has updated data in the list. Basically after the user hits the 'save'
    button so that the data is saved.
    The requirement is not to set up custom permissions since my SharePoint administrator said I should find another option. This administrator said he does not see a reason for only an 'add' permission.
    Thus can you tell me how to meet my requirements? Can you show me screen prints, pictures, or urls on how to solve the problem?

    Hi,
    According to your description, you might want to prevent users from editing the existing items.
    There are two workarounds I can provide as below:
    As the first workaround, you can remove Ribbon from SharePoint InfoPath List Form via modifying the OOTB settings of InfoPath Web Part.
    Here is a link about more details, you can use it as a reference:
    http://the-north.com/sharepoint/post/Remove-Ribbon-from-SharePoint-InfoPath-List-Form
    As the second workaround, you can apply the CSS code below to your page, it will hide the “Edit Item” button in the Ribbon:
    <style type="text/css">
    #Ribbon\.ListItem\.Manage\.EditProperties-Large{display: none !important;}
    </style>
    About how to add JavaScript/CSS into SharePoint page:
    http://blog.cloudshare.com/2012/10/29/how-to-insert-custom-javascript-code-in-sharepoint-2013-pages-part-i/
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to perform merge operation using Data services designer?

    I am new here and new to Data Services Desinger as well.
    And currently, I want to do a merge operation using query transform or table comparison transform. But sadly, neither one of them is giving me what I want.
    So, wonder if you could help clarify if either one of them could achieve MERGE operation between and source and target tables?
    if positive, then how?
    PS:
    by MERGE, i mean, if data exists in target table, then only do update, else, do insert. same with the standard MERGE operation of oracle.
    If you need any more info, let me know!
    Thanks in advance.

    You can do this.
    You don't need the Tabe_Comparison transform actually.
    Just query the data you need and output the flow from your query to your target table.
    Then, you'll have to check the "Auto correct load" option: this will insert new lines and updates old ones. One checked, you can ckeck the "Auto correct load" checkbox.
    By default, BODS will know a line already exists based uppon the primary key columns of your target table. If you want to change the columns used to determine if a line should be inserted or updated, use the "Use input key" checkbox (and define some PK column in your query).
    Hope this helps
    Guillaume

  • Views in Infopath 2013

    I have created an customized list form in InfoPath 2013.I have two views. One is user information where some user data is auto populated and some are filled by the user and I have also added attachment control. And another view is manager view who reviews
    the user form.
    here my problem is I want that attachment attached by user should be read only in manager view. In manager view manager only can read that attachment but should not able to add another attachment.
    Please help me how to solve this issue.

    In order for the attachment to show, you'll have to have the attachment control on the form. Unfortunately, this is not a field that can be disabled. You can add it to a section, but sections can only be hidden. You can make an entire view read only, but
    that would mean all fields are read only. If you need the other fields to be editable, then you'll need to do some sort of custom code to hide the attach button and the delete attachment button.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

Maybe you are looking for