Select to view content in your preferred language

Custom Web Tool "File" Input Data Type Defaults to All AGOL Instead of "My Content"

154
1
3 weeks ago
MaryEllenPerko
Occasional Contributor

Hi.  My custom web tool/notebook uses an input parameter of datatype = File.  When using the tool to select a file, the default list indicates "My content" but I'm seeing everything in AGOL.  In fact, no matter which filter option I use, I see all of AGOL.

MaryEllenPerko_0-1767366927300.png  

MaryEllenPerko_1-1767367337858.png

Anyone know if this is a bug or am I missing a setting somewhere? 

Also, while I'm here, is there a way to limit which file types are included in the list (e.g. CSV only)?

Thank you.

 

0 Kudos
1 Reply
VenkataKondepati
Frequent Contributor

This is expected behavior, not a setting you’re missing. For Web Tools / Notebooks with an input parameter of type File, the item picker does not honor content scoping (My Content, Favorites, etc.). It queries all accessible items in the org that can be treated as files, so the filter labels are misleading. This is a known AGOL limitation/bug, not something you can control in the tool configuration.

Regarding file types: there’s no way to restrict the picker to specific extensions (e.g., CSV only). The usual workaround is to:

Validate the file type inside the notebook/script and fail fast with a clear message, or

Use an Item ID (String) parameter instead of File and manually fetch/validate the item (gives you more control).

You can’t scope the picker or filter file types today; enforce constraints in code.

Regards,
Venkat
Book a meeting with me:Get on a Call
Follow me on: LinkedIn
0 Kudos