Skip to main content
Question

Populating New Field In Mobile Lookup

  • November 28, 2024
  • 1 reply
  • 14 views

Pinmaya Kumar Singh
Do Gooder (Partner)
Forum|alt.badge.img+5

Hi All,

I want to add a new field in the part lookup.

Like when a user clicks on part lookup column in mobile he can also see Rx material id(part info)

along with the part id.

Below is my code please guide anything is missing.

 

var partId = getControlValue('external_ref','part');
var rex = getUserInfo('part_id');
var rexID = getDBValue(stringFormat("SELECT external_ref FROM PART WHERE part_id='{0}'"rex,));
setControlValue('external_ref','part id',rexID);

1 reply

Shneor Cheshin
Superhero (Employee)
Forum|alt.badge.img+28
  • Superhero (Employee)
  • 1128 replies
  • December 2, 2024

@Pinmaya Kumar Singh 

Looks like a bit of syntax issues.

  • getControlValue expects different inputs.
    object getControlValue(string tableName, string columnName)
  • getUserInfo - This function is used to return information about the currently logged‐in user.
    Dont think this is your intention.
  • Do you have the part synced into mobile? 
  • setControlValue expects different inputs.
    bool setControlValue(string tableName, string columnName, object value)

This is my best guess:

var partid = getcontrolvalue('part','external_ref');
var rexid = getdbvalue(stringformat("select external_ref from part where part_id='{0}'", partid));
setcontrolvalue('part','external_ref',rexid);

 

Cheers!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings