Select to view content in your preferred language

Pass a path to a Geoprocessing widget through a browse button

1162
3
Jump to solution
09-14-2017 01:22 PM
AhmadSALEH1
Frequent Contributor

Hi,

I published a Geoprocessing tool that takes a csv file and pass it to XY line tool as shown below.

 

The tool works fine when I add it to the Web App builder, but for the “Input Table” value there is no button to select and browse for the csv file, so what I do is to copy the csv file path and past it in the Input Table value and then the tool works with me.

 

Is there any method to add a browse button to select the CSV file form my local machine  ?

 

Thanks,

Ahmad

0 Kudos
1 Solution

Accepted Solutions
JonathanQuinn
Esri Notable Contributor

You'll need to set the input type to a File and allow Uploads for the GP service.  Once you do that, any client should be able to pick up on that data type and provide a browse option.  You may run into data type compatibility issues as the XY to Line tool expects a Table View, but you're providing a File.  You may need to convert your model to a script.

View solution in original post

3 Replies
JonathanQuinn
Esri Notable Contributor

You'll need to set the input type to a File and allow Uploads for the GP service.  Once you do that, any client should be able to pick up on that data type and provide a browse option.  You may run into data type compatibility issues as the XY to Line tool expects a Table View, but you're providing a File.  You may need to convert your model to a script.

AhmadSALEH1
Frequent Contributor

Thanks Jonathan,

I allowed uploads previously, but the trick was with input type. After changing the  input type to a File it worked fine, thanks for the help.

0 Kudos
SOVANHALDER
Regular Contributor

Hi Ahmad,

  I am doing the same thing but getting following issues

1. Upload option is not visible from Web App

2. The GP service does not un from the REST as it gives error "Invalid value for parameter.. Unable to  parse  JSON value for parameter. I am uploading CSV file and giving the itemId as input

Any thought??

0 Kudos