Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

How to Auto-fill Inputs from Variables on Input Form Screens

Fred Isak
Tera Contributor

Hey all,

 

I'm working on a function that does something to an asset from a list screen located on the work order task form screen's segments. I've setup the swipe function, directing the user to a input form screen where we have the current context being the Asset in question, and the parent context being the work order task. 

 

From here, I need to pre-populate reference fields (referencing sm_asset_usage) from both Database & Parent Context field variables. Is this even possible? I need this to work because I need to utilize the platform's advanced reference qualifier to select the appropriate replacement asset, after the work order task, initial asset (where I will get model category from) and stockroom are populated. If anyone can direct to a way to set a reference qualifier without needing to set these values on the input form screen, than that would also help. 

 

For one example, I need to pre-populate the "service_order_task" field on sm_asset_usage table from the variable "wot_sys_id" I created as a variable type ParentContext with ContextField = "sys_id". This finds the right value, but setting it as the auto-fill variable on the input doesn't set it on the Reference field when displayed on the mobile app. 

 

Variable:

FredIsak_1-1678372903065.png

 

Input: 

FredIsak_0-1678372873085.png

 

I've been searching far and wide without any answers so far. Hopefully some of you have some knowledge 🙂

 

2 REPLIES 2

Hilbrandt van B
Tera Contributor

Hi Fred,

 

Any progress on this topic?

 

I'm looking also for more info concerning ParentContext.

From WOT we jump to an Asset (using a Function/Action Item/with UI Parameter QR/Barcode).

On the Asset we created a "Use" Footer Function/Action Item/Parameter Screen

The Parameter Screen requires the WOT id . The Action Item script creates the Asset Usage record.

 

How did you manage to get the wot id? Are you sure you have it in your variable wot_sys_id?

I'm getting the value undefined using your example.

 

Kind Regards,

Hilbrandt van Boven

sp32
Tera Expert

Hi Fred, 

 

I am having the similar issue, were you able to figure out how to use ParentContext when Auto-filling Inputs from Variables on Input Form Screens.