App Engine Table Question

Brian Sorensen
Giga Guru

I have a custom table with a simple App we have called New Hires

On the table I have a field called Position ID

In here our team enters the Position ID tied to a new hire.

 

On my ALM_hardware table I have a similar field, what I want to do is have the Workday Position ID column look at the record in in the ALM_table and post the model of computer we have for that role.

 

BrianSorensen_0-1702948891727.png

 

Above is the example of the App Engine table

This is the properties

BrianSorensen_1-1702949020396.png

 

 

Any idea how I configure this?

 

Essentially if someone enters the ID P017254, the Available asset would return the Model value below

BrianSorensen_2-1702949144117.png

Assuming there is something in here I need to code?

 

BrianSorensen_3-1702949203914.png

 

7 REPLIES 7

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Brian Sorensen ,

 

You can simply write an onChange client script (of the position I'd field) here fetch the model value using GlideAjax from script include & use it in ur client script .

 

Thanks,

Danish

 

thanks!
Im not great at scripting.  Do you know where in App Engine I do that? and what that would look like?

@Brian Sorensen : From Native UI, you can select your required application and then create the configuration file. For creating business rule, navigate to System Definition->Business Rules from application navigator.

sainathnekkanti_0-1702954398906.png

 

Sainath N
Mega Sage
Mega Sage

@Brian Sorensen : We can configure before update business rule (with condition: workday position id changes) and in the logic you can query "alm_hardware" table with MLSE Position ID and if you find the record then return the model field value to update the "Avaialable Asset" field. Below is reference code and backend field names in the script needs to be updated as per your column names.

 

var gr = new GlideRecord("alm_hardware");
gr.addQuery("MLSE Position ID", current.Workday Position ID);
gr.query();
if (gr.next()) {
    current.Available Asset = gr.Model;
}
 
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
 
Regards,
Sainath N