Good afternoon everyone, how can I make the browser only show me files with an .xlsx extension or excel files in general? Because currently it allows me to select any file and sends an error, what I want is not to correct the error, but two things, one, that the explorer only show excel files or two, that when I select another type of file, it shows a message to the Username.
try the following line, but it didn't work.
&extension=&file.FileType
If &extension=xlsx
contunia
else
msg('file type error')
endif
thanks in advance
It occurs to me that you can solve it with the "File Upload" control.
https://wiki.genexus.com/commwiki/servlet/wiki?30574,File%20Upload%20control
In it you can by the "Accepted File Type" property, indicate what extension you want for the files. In your case it should be like this:
The only option for the selection window to show certain types of files is as the colleague in the previous answer said, using the UC FileUpload.
Check the file extension, it's something I've done many times... In the example you put a file variable... But how did you assign the source?
You have to be careful in the way you take the file, that is... Through what... Do you use a blob variable on the screen? Or blob file? Be careful with this because the name and extension methods do not return the same thing... I once made an example to compare them and they are different...