Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Step-by-step guide


  1. Click on Modules.
  2. Select the Module with the appropriate form field.
  3. Select the Forms tab.
  4. Select Master form.
  5. Use the filter to find relevant field.
  6. Select Edit on the field.
  7. Select Cutsom JavaScript tab.
  8. As depicted in the picture below
  9. Paste or type JavaScript to be added to, in this case, the part field.
  10. NOTE the /lookup/872/ has to match the form number of the Lookup.


  var partDescriptionField = fieldScope.getColumnFromDisplay("Part Description");

  var containerTypeField = fieldScope.getColumnFromDisplay("Container Type");

  var partName = formScope.formdata["customString3"].trim();

  var url = 'api/tenant/' + userInfo.id + '/module/' + formScope.formdata["moduleId"] + '/lookup/872/entities?name=' + escape(partName );

         http({

               url: url

           }).success(

           function (data, status, headers) {

if (data.length > 0) {

 formScope.formdata[partDescriptionField.name] = data[0].customLongText1;

 formScope.formdata[containerTypeField.name] = data[0].customString4;

formScope.alert = {};

 

} else {

formScope.formdata[partDescriptionField.name] = undefined;

formScope.formdata[containerTypeField.name] = undefined;

var msg = "Could not find details for part '"+partName + "'";

formScope.alert = {};

formScope.alert.msg = msg;

formScope.alert.type='warning';

}

})

 

Info

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@8fc
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "step-by-step" and type = "page" and space = "HD"
labelsStep-by-step


Page Properties
hiddentrue


Related issues