Skip to content

Instantly share code, notes, and snippets.

@SriniBlog
Last active December 23, 2015 16:10
Show Gist options
  • Save SriniBlog/7466438a946274e19957 to your computer and use it in GitHub Desktop.
Save SriniBlog/7466438a946274e19957 to your computer and use it in GitHub Desktop.
This function checks the field if it has the value in the field.
public String hasLike(String FieldValue, String searchValue, Container container) throws StreamTransformationException{
String newFieldValue = "not found";
try{
//Find the index value of the searchvalue
int index = FieldValue.indexOf(searchValue);
if(index >= 0){ //if found
newFieldValue = "found";
}
}catch(Exception ee){
}
return newFieldValue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment