
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Passing value of variable
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
- Tags:
- scriptloadexpression
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is it you do when you "pass the name of country to database"?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Swapneel, you can use:
SET vCountry = "=GetFieldSelections(Country)";

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ruben Marin,
Thanks for the quick reply but, the solution is not working,
plz find the attached images for reference.
Thanks & Regards
Swapneel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI Jonathan dienst,
thanks for replying, but it didnt work
I am attaching the images for reference.
Thanks again,
Regards
Swapneel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to achieve dynamic loading.
Regards
Swapneel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You can use peek function.
LET vAB=Peek(fieldname,0,tablename);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- « Previous Replies
-
- 1
- 2
- Next Replies »