/
Data Validation

Data Validation

Search the IFS Workflow Wiki
 
Back to Troubleshooting Articles     

Data Validation Issue

Issue: When validating whether some data that the user has entered is correct or not, an Error message may show up on the next dynaform screen, noting that the data is incorrect and that the user should go back and try again.

Resolution:  We can accomplish this by using the SendMessageText() function in a PM trigger.  In this example, we have sent the @@ownerId value of " IEE " via a rest service and then added the return values to the $ownerSitesArray .  We then check to see if the $ ownerSitesArray is empty, in which case "IEE" is invalid.  If this is the case, we then use the SendMessageText function to output the error message to the user.

if(empty($ownerSitesArray[1])){
        $g = new G();
        $g->SendMessageText("Unable to find the owner: '".@@ownerId."'.  Please go back and try again.", "ERROR");
    }


Copyright© 2024 IFS AB. Copying prohibited. All rights reserved.