---
title: "PCF - Single Autocomplete"
canonical: "https://support.appfire.com/space/PSJ/1589019773/PCF%20-%20Single%20Autocomplete"
format: markdown
---
> Macro (aura-html)

> Macro (button-handy)



---

## Examples

| **Example** | **Sample script** | **Sample display output** |
| --- | --- | --- |
| Using PCF - Single Autocomplete with SIL data source | This script retrieves all existing issues and filters them based on the search query, returning only issues whose summaries match the search text.<br>```
string [] issues = selectIssues("created < now()");
string [] res;
for (string iss in issues) {
    if (contains(iss.summary, argv["query"])) {
    	res = addElementIfNotExist(res, iss);
    }
}
return res;
``` | "DEMO-123 (Implement login feature)"  
"TEST-456 (Update user interface)"  
"PROD-789 (Fix database connection)" |
| Using PCF - Single Autocomplete with SQL data source | This query retrieves all issue keys by combining project keys and issue numbers.<br>> ℹ️ Before using SQL data source, ensure you've configured the JNDI settings as detailed in the [SQL data source documentation](https://appfire.atlassian.net/wiki/spaces/PSJ/pages/1589019609).<br>```
select  p.project_key ||'-'||i.issuenum as "KEY"
from jiraissue i
inner join project_key p on p.project_id = i.project
``` | "DEMO-123 (Implement login feature)"  
"TEST-456 (Update user interface)"  
"PROD-789 (Fix database connection)" |