Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7929601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:08:12+00:00 2026-06-03T20:08:12+00:00

Still fairly new to google app scripts and saw a great class with crappy

  • 0

Still fairly new to google app scripts and saw a great class with crappy documentation.

https://developers.google.com/apps-script/class_docslistdialog. I’m hoping to use this to allow my users to select a document from their Google collection.

Here’s what I’ve started:

var app = UiApp.createApplication().setHeight(400).setWidth(600);
var ss = SpreadsheetApp.getActiveSpreadsheet();
var doclisthandler = app.createServerHandler('selectionhandler');
var doclist = app.createDocsListDialog().showDocsPicker().addSelectionHandler(doclisthandler); 
ss.show(app);}

function selectionhandler(e)
{    var app = UiApp.getActiveApplication();
var selname = e.parameter.doclist;           
toastDoc.toast(selname,'here in selectionhandler',4);
return app;
}

My toastDoc.toast is just to verify my selectionhandler function works and see what is returned. selname returns ‘undefined’.

I’ve looked for examples on this class other than what’s in the url from above, but I got nothing 🙁

Ideally, I’d like to return the document id that is selected so that my script can do further processing…

Any assistance would be appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:08:13+00:00Added an answer on June 3, 2026 at 8:08 pm

    To check what it returns, you can use below function. Everything will be returned in Logger

    function selectionhandler(e){
      var app = UiApp.getActiveApplication();
      Logger.log(e.parameter.items[0].id);
      Logger.log(e.parameter.items[0].name);
      Logger.log(e.parameter.items[0].url);
    //Or to check everything which is returned in e.parameter
      Logger.log(e.parameter);
      return app;
    }
    

    Hope that helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Still fairly new to django and python... I've defined two forms as follows: class
I'm still fairly new to working with java and the google appengine datastore. I
Let me say I am still fairly new to google maps and javascript. i've
Still fairly new to android, wondered if anyone can help... I have an App
I am still fairly new to EDI, and learning it on a new job.
I'm still fairly new to Scala, and I'm discovering new and interesting ways for
I am still fairly new to C# and I am trying to decide the
I'm still fairly new to rails so I'm not sure what I'm missing here.
I am still fairly new to parallel computing so I am not too sure
I'm still fairly new to Python, and my OO experience comes from Java. So

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.