I have a select list in a modal, and I am putting that into a page variable. I think I may need to add it to an application variable actually, but how would I add the variable to this prompt below? I want to replace ‘into german, english, chinese and spanish’ and just have
translate the information into #MY_VARIABLE
You can see below my prompt, and my selector, and the fact I put the value into the console, so I can fetch it, then my javascript to get it.
The system prompt is:
Translate the information into german, english, chinese and spanish and put the language at the beginning of the translation
And my javascript code is a dynamic action attached to the select list on page 20.
var e = document.getElementById("P20_LANGUAGE");
var value = e.value;
var text = e.options[e.selectedIndex].text;
console.log(text);
document.getElementById("P20_LANGUAGE_ITEM").innerHTML = text;
I also have this as a hidden variable on page 20:
As another dynamic action after the javascript one is an execute pl/sql and this is the code there:
:USER_LANGUAGE := :P20_LANGUAGE_ITEM;
I have USER_LANGUAGE defined in shared components → application item and the security is unrestricted.
And finally, after I select a language this variable was set:
So, assuming my pl/sql was correct then back to how do I substitute USER_LANGUAGE into my prompt?