The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What's the difference between Retrieval/validation SQL and Search SQL

Vincent Lee
January 7, 2020

Helllo All,

I'm starting to learn ScripFields, and I create a Database picker.

I have already set up the Resurces Database and Connenction.

But I don't understand what't the difference between these two field, Retrieval/validation SQL and Search SQL.

Even I read the doucument here,

https://scriptrunner.adaptavist.com/5.6.8.1-jira8/jira/script-fields/database-picker.html

 

Could you give me more detail description or example?

Thanks in advance,

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 9, 2020

I haven't played a lot with this, but I think it's like this:

The Search SQL controls the list of values that will be available in the drop-down.
It appears to expect 2 columns returned. The first one will be the value stored with the issue as the custom field value. The second is what you see in the drop-down.
You would normally want to filter that list based on the user's typeahead entry "where lower(pname) like concat(lower(?), '%')"

The Retrieval/validation SQL will extrapolate the value stored against the custom field with the details returned from the sql (second column). This is what you will see when viewing an issue in a view screen or in an issue navigator (column).

Vincent Lee
January 12, 2020

Thanks for your answers! 

I have try that, and the result is just like what you said.

I think your thinking is true.

Thank you