Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to Parse Document ID Field?

Binh Truong2
Mega Expert

Hello world!

We have a document ID type field named "Trigger ID". This field is auto populated by the system which concatenates the related table and number. I need to find a way to parse out only the number (highlighted in yellow) so i can use to copy onto a new reference field on the same form. Any idears? Thanks

find_real_file.png

1 ACCEPTED SOLUTION

srinivasthelu
Tera Guru

HI Binh,



reference field accepts Sys_id's so, You can do a simple assignment and that should work.



gr.u_target_refereence_field=gr.u_target_id;


View solution in original post

6 REPLIES 6

You can actually dot-walk to the original record as well, so you can do "var number = current.u_trigger_id.number".



Or even "current.u_trigger_id.assignment_group.getDisplayValue()" to get the name of the Assignment group if you need that.   In other words, pretty much anything that you can do with a Reference field.   You can't get the "real" display value of the record (getDisplayValue gives you the table name + display value).   There may be some other limitations that I am not aware of.


Thanks a lot ctomasi for your kind help in splitting the number field.



Kind Regards,


Rajshekhar Paul