set reference qualifier through script for Lookup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 05:34 AM
I am working on Eureka and looking help to set reference qualifier through script for Lookup Select box catalog variable. I have two variables:
- Application - Select box
- Operation — Lookup select box
I put reference qual = "u_application_unit=" + current.variables.application for variable "Operation".
But this works only on load not on change of variable Application variable. reference current.variables in the reference qualifier and have the field refresh when another variable changes
Can anyone help me how to do this.
Thanks
Chandan !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 07:11 AM
I would put this into a script include and call that in the Ref Qual, you will be able to evaluate the currently selected app that way:
reference qualifier: javascript:returnOperations()
script include:
name: returnOperations();
var answer = ''; //use to return blank if app is not currently having a value
var app = current.variables.application; //query the variable application
if (!app.nil()){ //if app is not empty
answer = 'u_application_unit='+app; //include the query
}
return answer; //return the query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2014 09:51 PM
Hi Mguy,
Thanks for your reply.
When i see your script. you are using current in script include.
1. In script include current will not work.
2. Script include always work on form load not on change.
If you have any other idea please help my.
Thanks
Chandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2014 12:01 AM
Reference qualifiers in look up select box will not work on OnChange. You have to write OnChange catalog client script on Application variable and you can dynamically populate the options for Operation variable by querying the look up table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2014 12:09 AM
Thanks Jeeva,
I am doing the same approach right now. But I was thinking can we use g_filter to set filter query in client script for List Collectors. Do you know about this?
Thanks
Chandan