Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a list box for countries.
I want to select one country and pass the name of country to database.
How can I do it ?
My Approach:
I am taking the currently selected Country into a variable vCountry = GetFieldSelections(Country)
This shows the value correctly in the text object as vCountry showing the value of currently selected country.
But when I want to pass it further, using $(vCountry), it still passes the value as 'GetFieldSelections(Country)' and not the actual selected country.
I tried using LET in script but still it didnt work, how can I set it to StringContent.
I dont want to use macro.
Kindly help, thanks in advance
Regards
Swapneel
Thanks for your precious support everyone.
I finally had no option, but to go for the macro approach.
Thanks again, you all have been quick at replies.
Definately count worthy people.
Thanks again.
Regards
Swapneel
What is it you do when you "pass the name of country to database"?
Not sure what you are trying to do here, but the variable definition should be
=GetFieldSelections(Country)
where the = is part of the definition. Now $(vCountry) will return the selection.
In a set statement
Set vCountry = =GetFieldSelections(Country);
(the = = is not a typo)
HTH
Jonathan
Hi Swapneel, you can use:
SET vCountry = "=GetFieldSelections(Country)";
Hi Ruben Marin,
Thanks for the quick reply but, the solution is not working,
plz find the attached images for reference.
Thanks & Regards
Swapneel
HI Jonathan dienst,
thanks for replying, but it didnt work
I am attaching the images for reference.
Thanks again,
Regards
Swapneel
I want to achieve dynamic loading.
Regards
Swapneel
Hi,
You can use peek function.
LET vAB=Peek(fieldname,0,tablename);
Hi Swapneel, GetFieldSelections() won't work in script, in this case you should do a FOR bucle, ie:
FOR i =0 to NoOfRows('tablesList')-1
LET vTable=Peek('Tables', $(i), 'tablesList');
LOAD *;
SELECT * FROM [DEVS_ID.$(vTable)];
NEXT
This will load all your tables wich most probably will return a mess of tables. Only way I see this working is if all the tables returned in tablesList have the same fields.
What are you trying to do?
Hi,
How your trying to read? that is user will make the selection in the front end of your dashboard and then your trying to push this to DB? if so your variable set should work. But if your trying to capture in the script then we need to think how your doing....can you please answer my questions