Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone, I am trying to figure out how to do this.
My goal is to have a button when clicked calls a function that
Takes the current selection and generates those rows in to a txt file.
I was thinking I would use the getcurrentselection function but not totally sure how to use it.
Thanks for any help,
Jason
Hi Jason,
GetCurrentSelection only returns values if you have a selection - it won't return "possible" values.
Assign a variable to =Concat(FieldName, ',') instead, then you can get a comma separated list from the variable to use in VBS.
Stephen
Or else, there is a built in function with activities called "export" that let's you export all possible selections in any given field/fields to a file of any format you'd like, in your case a comma separated textfile.
Problems are of course that this is the "getpossible()"-equivalent of what you want, not the "getcurrentselections()". Worth looking into though.
Else, I would suggest you go with Stephens suggestion on a textfield that uses =concat(field,separator), and export the contents of that, preferably with activities instead of using VBS.
Hope anything helps!
BR
Jakob Berglund
hi there,
there are few issues concerning exports from the layout.
the main one that related here is that there is no real ROW in the layout. all the methods mentioned already are good to export the values from field/fields.
you say you want to export the current selection, but what exactly. current selection may envolve several fields.
if you just want the selected values of each field in a seperate line then the EXPORT triger action suggested by others here is the solution.
if you want to export a pivot or striaght table then just right click on it and choose EXPORT. when you have selection the pivot/str8 table will only display the posible rows, so when you export it it will give you the posible rows of that object.
and if you just want the "current selections" then you can also right click and select EXPORT on the "current selection box" so just add one to the layout
Mansyno
Hello Jason
I kind of have the same issue as you were i want to, on all print-outs, have a complete list of all selected values for any given fields (not the one that hasn't got a selection). The problem here is the current selection box which after more then x values for a field gives a "X of Y values selected" instead of listing the values one by one. Of course this is good for the layout cause the current selection box gets readable but for my customer the selection criteria is very critical to the print-outs. A "X of Y values selected" isn't good enough.
I've tried with exporting the Current Selection box but that only gives me the same info as the actual box. I think the only way so solve this is, as earlier suggested,make a concat(field,',') for every possible field and add that to a report (in a pivot table maybee).
EDIT:
Ive tried it and it doesn't work that good 😞
The concat function will of course show all possible values, and no the one explicity selected.
A function that will work for my case is the GetCurrentSelections() with a forth parameter set to the the max. value of rows in the data. Add this to a text box and put that textbox first on every report. F.ex.;
=GetCurrentSelections(chr(13),': ',',',99999999)
Maybee you can do something about this text object to export the values.