Create Service - Forum - Mobile - Progress Community

Create Service

 Forum

Create Service

This question is answered

I am using a create service on a page. I have components (labels, input, etc.) mapped to the service. When I invoke the service I am performing some validation on the appserver and if the validation fails I am performing an UNDO, THROW. I then will display the error on the mobile device as to alert the user. This all works well but the text/val from the components is cleared. Is this correct behavior? I would like to retain this text/val so the user can just fix what the error tells them to fix.

Verified Answer
  • Do you clear out the fields on a successful call? If so, how? Could this be being called if unsuccessful as well as successful?

    I just wrote up a basic example of what  you are describing and it seems to work for me (i.e. leaves the fields as is).

    If I am right about the changing of the fields being coded, perhaps have it happen on the success call of the create only.

    If I am wrong on this, maybe an example/explanation of how you have it setup would be useful as it doesn't appear (in 11.3.2 against current Mobile AppBuilder) to be the way it behaves.

    HTH

All Replies
  • Do you clear out the fields on a successful call? If so, how? Could this be being called if unsuccessful as well as successful?

    I just wrote up a basic example of what  you are describing and it seems to work for me (i.e. leaves the fields as is).

    If I am right about the changing of the fields being coded, perhaps have it happen on the success call of the create only.

    If I am wrong on this, maybe an example/explanation of how you have it setup would be useful as it doesn't appear (in 11.3.2 against current Mobile AppBuilder) to be the way it behaves.

    HTH

  • I figured out the issue. On my PageShow I would use JS to determine what page i was coming from. Based on the page I was coming from I would clear out the controls text/val. When I invoked my create call and returned an error I would display the error in a popup. Once I clicked ok my controls were being cleared because the PageShow event would fire and I was not testing for the Popup page.

    Thanks.