- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 09:13 AM
I have a script that populates a listbox with the displayValue. That is not going to work because I have comma's in the names of the companies that are in the listbox. This is not a list collector it's a list
I can get the display value in there but it's not linking to the company when I click the preview it show nothing but if I add it with the lookup field it works as far as giving me the company in preview.
What am I doing wrong? I have the script include/client script (that populates based on a T/F field). These work but can't put the sys_id in the field and have it work (return the company name with the sys_id showing.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2020 12:09 PM
I found the problem, I was referencing the incorrect table. I was looking at Contracts instead of pulling from Company records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 09:20 AM
Share your scripts and we'll get it sorted out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 09:51 AM
I don't think I'm following. The Display Value of your Companies list should be Name, but it shouldn't matter if Name contains a comma. If you have a script that is populating the List field, it should be doing so with sys_ids, but it will display Name - with or without commas. You can also use the search box to lookup a company by name, or select the search icon to select a company from the pop-up window, so which part isn't working for you?
I have populated the List Ref field via an onChange client script and script include. All of the records returned by my SI are included. I can also search for additional companies to populate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 03:29 PM
Would love to see the script you used - I bashed my head against a brick wall for hours and got nowhere. I raised a HI ticket and they couldn't solve my problem either!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 06:32 AM
Sounds like a challenge. I don't know if I still have this example, but at the basic level you could hard-code a list of sys_ids for records on the list table, then in a client script g_form.setValue of that field to that list. It seems like in this post I was calling a Script Include to get the correct list of values. What is it you are trying to do?