- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 01:20 AM
I have created a form in that I have added few fields in that I have created "Account" , "Display Name" & "Name" Fields.
In this I need help whenever I request new project I will select "Account" field and fill " Name" Fields. So, here I need to automatically "Display Name" filed has to fill Example : " Account - Name" fields values in Display Name filed.
Please help the field values has to be in this sequence in Display Name Filed : " Account - Name"
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 03:46 AM
try this code :
is backed name of name field "short_description" ??
is yes then :
var account= g_form.getReference("u_account").short_description;
var name= g_form.getValue("short_description");
var displayName = account +"-"+name;
g_form.setValue("u_display_name",displayName);
=====================================
but if backend name of "name" field is another then:
var account= g_form.getReference("u_account").short_description;
var name= g_form.getValue("backend name of name field");
var displayName = account +"-"+name;
g_form.setValue("u_display_name",displayName);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 01:42 AM
Hi Jry,
Do you want that "display name" should be auto populated when account value is selected ?
if yes then write below code in >> onChange Client script.
var account= g_form.getReference("account",fun);
function fun()
{
g_form.setValue("display_name",account.display_value);
//account.display_value is value in account table for display name
}
Kindly mark helpful and correct if it works.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 02:20 AM
Not only account value I need name field values also be auto populated.
Example : If I select any account in account field and type/fill any values in name field
Account : Apple - Sales management
Name : Request 123456 update project apple.
then as shown below has to auto populate
Display Name : Apple - Request 123456 update project apple
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 02:44 AM
write onChange Client script >> on Name field
and write below code:
var account= g_form.getReference("account").name;
var name= g_form.getValue("name");
var displayName = account +"-"+ name;
g_form.setValue("u_emp_sal",displayName);
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2020 03:36 AM
I have tried it showing error
function onChange() {
var account= g_form.getReference("u_account").short_description;
var name= g_form.getValue("short_description");
var displayName = u_account +"-"+ short_description;
g_form.setValue(u_display_name);
}