I have a custom entity field type whose is list/re...
# ask-stanley-ai
a
I have a custom entity field type whose is list/record and source is employee. How can I filter the results to only the selected employees?
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** To filter the results of a custom entity field type whose source is 'employee' to only the selected employees, you can use the 'Sourcing & Filtering' option in the field settings. However, this might not always be straightforward if you want to filter based on specific criteria that are not available in the standard options. Here are the steps you can follow: 1. Create a custom field (checkbox type) on the Employee record. This field will be used to mark the employees that you want to include in your list. 2. Go to your custom entity field settings and navigate to the 'Sourcing & Filtering' section. 3. In the 'Filter Using' dropdown, select the custom checkbox field you created in step 1. 4. Set the 'Filter Compare Type' to 'is'. In the 'Filter Value' field, select 'T' (which stands for true). This will filter the list to only include employees where the checkbox is ticked. Please note that this method requires you to manually update the checkbox field for each employee that you want to include in your list. If you need a more dynamic solution, you might need to use SuiteScript to programmatically set the checkbox field based on your specific criteria. Here are some resources that might help you with the SuiteScript solution: - [SuiteScript 2.0 Sample Code for Filtering a Dropdown Field](https://ceanatech.com/2019/11/06/suitescript-2-0-sample-code-for-filtering-a-dropdown-field/) - [SuiteScript 2.x Suitelet Select Field that Sources the Options from a Saved Search](https://ceanatech.com/2022/02/21/suitescript-2-x-suitelet-select-field-that-sources-the-options-from-a-saved-search/) Remember, you will need to create another list/record entity field and set it using SuiteScript so that you can use it with the filtering of the original field.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.844424546
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834784806
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.832666755
Please provide your feedback on this answer.