Submit button being disabled if no changes are made to the editable grid

Under the grid, display a SAVE button. The button should be disabled by default.
If any changes are made to the grid (i.e. if a row is added, a row is removed, or data entered for a row is changed), the button should be enabled. After the button is clicked, it should become disabled again. Any help will be appreciated.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to RAHUL GANJI

    a!textField automatically performs its saveInto when the field is unfocused (i.e. the user clicks or tabs away); the WITH() variable won't update until after that.  In general, it updates fast enough that the user can't get to the button in time even if they change something and try clicking right away.  However if you need it to be even tighter in timing, you can add 'refreshafter: "KEYPRESS"' to the a!textField which will cause the saveInto to be immediately executed every time the user changes something.  This has performance implications if you use it too much or in too many fields in a form, but with limited usage it works fine.  If I understand your scenario correctly, this is probably the solution you're looking for.

  • No I dont want the button to be enabled if the user doesnot actually makes changes to the editable field and also how can I check with the documents being duplicated...dont want to upload a new document if it already exists

  • 0
    Certified Lead Developer
    in reply to RAHUL GANJI
    No I dont want the button to be enabled if the user doesnot actually makes changes

    the code I've suggested handles this.

    and also how can I check with the documents being duplicated...dont want to upload a new document if it already exists

    Appian treats all uploaded files as unique IDs - it has no direct way of knowing whether two different files are identical, though you could add a validation to your upload which checks whether the uploaded file name and size (for example) are identical to a previously uploaded file.

  • Mike ,

    I have a relation action shortcut on a record summary 

    When I perform "Delete Record" related action ,the record successfully gets deleted through a process model without activity chaining but after deletion it returns back to the Summary dashboard instead of the Record grid view...How can I handle this? 

  • 0
    Certified Lead Developer
    in reply to RAHUL GANJI

    There's no easy way to do this that I know of.  One of the only suggestions I have might be, after the deletion is completed, have the user chain forward into a user input task that has no Submit button - and on that task, show a record link with the record type set but no record identifier - i believe this will cause them to be linked to the record listing when they click it.  (The task would need to time out after a few minutes to end the process in the background.)  The text for the link could say something like, "Click here to return to Record Listing", along with some explanation that the record has now been deleted and to not try clicking back to "summary" etc.

  • 0
    Certified Lead Developer
    in reply to RAHUL GANJI

    BTW, if any of my answers are helping you, I hope you'll click "Verify" on one or more of them in order to make sure I get credit :)