How to manage Progress Status movements in a form - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How to manage Progress Status movements in a form

Last post 09-17-2021 11:46 AM by Hilary Stoupa. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 09-03-2021 07:09 AM

    How to manage Progress Status movements in a form

    Hi InfoPath Devs!
    I'm sure this is a common use case and wondering if there is an elegant way to manage progress status changes or a state matrix in a field WITHOUT the need for code/SP Designer or Power Automate.
    For example I have a "Progress Status" field with 10 choices = Status 1 -> Status 10
    When a user creates a new item the status defaults to Status 1, and from this Status you can only move to Status 2 so it should only appear as selectable in the same field.
    If I'm at Status 2 then I can only go to Status 3 or Status 5 and so on depending on what Status I'm at
    Would this be possible to do just in one field or would it probably need more than 1 field to be able trigger some update field rules etc?
    I have "hacked" this before by creating multiple views of the same data and in particular views only particular values in the Status field are available, but with this form it could become a maintenance nightmare, so any suggestions welcome?!
    I'm using Sharepoint to store the data so was also thinking maybe an external SP list that maintains the state matrix but will that work all in one field?
    Thanks
    Mark
  • 09-09-2021 08:49 AM In reply to

    Re: How to manage Progress Status movements in a form

    Here's a sample file - right click the linked form, save locally. Right click the saved form, right click and select design to open in design mode, and then you can preview, see if this is kind of what you are looking for?
    Hilary Stoupa

  • 09-09-2021 10:39 AM In reply to

    Re: How to manage Progress Status movements in a form

    Awesome Hilary this helps alright, thanks!

    So it's a one column SharePoint list to hold the stages 1-> 12 for example.
    Then in the form Stages field entries set the filter exactly as you have, selecting the correct field that holds the values form the external list,

    preceding-sibling::Status[1] = xdXDocument:get-DOM()/my:myFields/my:field1
    following-sibling::Status[1] = xdXDocument:get-DOM()/my:myFields/my:field1

    And this allows you to go to the next stage or back to the previous stage.

    I know they have multiple jump off points at some stages i.e. it could possibly go down a happy path or an alternative path, is this possible too or are we limited to one stage movements?

    This is great though thanks!
  • 09-13-2021 08:08 AM In reply to

    Re: How to manage Progress Status movements in a form

    I suppose if you had a list with all the options - like Stage 1 can go to 2, 5 or 8 or something, it might be possible? I'll try to take a look in the next day or so and see if I can put together a sample.
    Hilary Stoupa

  • 09-14-2021 06:11 AM In reply to

    Re: How to manage Progress Status movements in a form

    Yeah if it can be managed with a list and needs an extra field that would work either, I'm just not getting it to work all within one field but if that's possible then great!
  • 09-14-2021 08:01 AM In reply to

    Re: How to manage Progress Status movements in a form

    So, I added another XML file to this copy, that has stages and paths - save the XML from the form's resource files and you'll see the data (or put the secondary data source on the form). I've set the paths so that stages 1 & 2 can also go to Stage 5, and so that Stage 5 can also go to stages 9 or 10. I only had to add one more filter on the dropdown for this to work as anticipated - hopefully this will meet your needs.
    Hilary Stoupa

  • 09-17-2021 05:45 AM In reply to

    Re: How to manage Progress Status movements in a form

    Hi Hilary

    This is it exactly, thanks.
    Just so I'm clear, i would create a list with 2 columns as use as the data source, then replicate the expressions and filters as per your example and should be good to go?

    Stage Path
    Stage1 Stage2
    Stage1 Stage4
    Stage2 Stage3
    Stage2 Stage5


    Thanks again
  • 09-17-2021 11:46 AM In reply to

    Re: How to manage Progress Status movements in a form

    Yeah, and it could probably be done with a single list - the stage dropdown would need to only show unique items - I just added a second XML because it was faster for me than re-doing the initial work :)
    Hilary Stoupa

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