HOW TO WRITE THE CODE TO CHANGE VALUE IN FIELD STATUS TO +1 - InfoPath Dev
in

InfoPath Dev

HOW TO WRITE THE CODE TO CHANGE VALUE IN FIELD STATUS TO +1

Last post 01-23-2014 02:07 AM by Tesoro. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-15-2013 01:31 AM

    HOW TO WRITE THE CODE TO CHANGE VALUE IN FIELD STATUS TO +1

    Hi All,

    I would like to treat my form as a kind of workflow.

    1. Form is filled in by the user and sent to Manager via email.

    2. Manger open form via email and click ACCEPT. Form is sent to the SharePoint and to Administration department

    3. Administration dep. Open the form via email and click the link, which is placed in the form

    There are 2 buttons and 1 link: SENT FOR APPROVAL, ACCEPT and LINK. I would like to visible button SENT FOR APPROVAL only on 1st step (form initiator), button ACCEPT only on 2nd step (Manager) and LINK only on step 3rd (Administration dep.) What I came up?

    I would like to add a filed STATUS (hidden for users) with default value = 0 and if the user press the button status will be change to 1 (I reached this by using rules) and I set up other rule to visible button SENT FOR APPROVAL only in case when status = 0. Form is sent to manager - When manager open the form status will be change to 2 (how the code should look like?) and I will setup the rule to visible button ACCEPT only in case when status =2. When the Manager presses the button ACCEPT value in STATUS field will be change to 3 (using rules). Form is sent to Administration dep. – When Administration dep. Open the form value in field STATUS will be change to 4 (how the code should look like?) and I will set up the rule to visible LINK only in case when STATUS = 4.

    MY MAIN QUESTION IS: HOW TO WRITE THE CODE TO CHANGE VALUE IN FIELD STATUS TO +1?

    Thank you in advance

  • 01-21-2014 04:20 AM In reply to

    Re: HOW TO WRITE THE CODE TO CHANGE VALUE IN FIELD STATUS TO +1

    up. Please advise. I have an infopath form with field status (default = 0). when you click on submit button the form is sent via email. I would like to have value 1 in field status after opening the email. Please, help.
  • 01-21-2014 06:51 AM In reply to

    Re: HOW TO WRITE THE CODE TO CHANGE VALUE IN FIELD STATUS TO +1

     Hello Tesoro,

     You don't need code for this. You can simply place a rule on the button to set the field to the value field + 1 . If your button is configured as a Submit and your submit settings are to simply submit the form via e-mail, you can change the submit settings to the Execute Rules option and then add rules that perform the e-mail submit and change the field's values.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-23-2014 02:07 AM In reply to

    Re: HOW TO WRITE THE CODE TO CHANGE VALUE IN FIELD STATUS TO +1

    Hi Jimmy, I have no idea how to do this. Could you, please, tell me step by step or maybe you could do an example for me? I attached example form. I' ve used the rules in my form to change this field but it doesn't work in case when someone forget to fill in required field. Originator fill in fields (but one of required fields is missing) and press button 'Send for approval'. The form return an error that you have to fill in all required fields but button 'Send for approval' disappears and there is a new button 'Accept'. :/ PS. Thank you for your help (it's not the first time ;) )
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.