Service Portal - Record Produer

sharvil Sheth1
Kilo Guru

I have a requirement: As soon as user attaches file in out of the box attachment, then data in the file should be stored in a variable which is multi line text.

sharvilSheth1_0-1770966031570.png

 

10 REPLIES 10

sharvil Sheth1
Kilo Guru

@pratikjagtap @vaishali231 

it is a record producer and not a catalog item

@sharvil Sheth1  confirm one more thing you want it on portal while submitting or after submission you want it on table ?

 

@pratikjagtap 

As soon as user attaches the file the variable should fetch the data. yes, it should be while submitting

@sharvil Sheth1 , 
no its not possible follow the the steps which is provided by Ankur and please like my answer.
Thanks in advance

Ankur Bawiskar
Tera Patron

@sharvil Sheth1 

Not possible to store that data in other variable before submission as you can't write onChange client script when file is attached

Workaround:

1) create attachment type field on your record producer

2) create onChange catalog client script on that variable

3) whenever onChange runs pass the variable value i.e. sysId to GlideAjax script include, parse the txt file, return the data and then store in multi-line text

these links have solution from me which should help you and you can enhance your script

Validate Excel Data and populate in MRVS 

Validations on MRVS - validate Employee ID 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader