In app maker I have created a drive picker to add project files to a project tracking app. I have everything working the way I want to (thanks to some app maker samples & videos) except for the icon of the document. When I use the picker to select a file, or multiple files, the selected files are then shown in a list above the picker. File name, url link both work but icon will not show up. Any ideas? I've been working on this seemingly minor thing for hours with zero luch.
I have a model, called Files, set up. In it I have Name, Url, and Icon. In the properties for the picker, I have name and url bound to the appropriate datasource items and I have the following code bound to onDocumentSelect. I got that code from a video where a guy was doing basically what I'm doing except it worked on his. I've watched the video a hundred times probably to see if there's anything I did different.
widget.datasource.item.icon = result.docs[0].iconUrl;
widget.datasource.createItem();
This should retrieve the icon of the selected docs, after they're selected, and create the icon item in the datasource. What am I doing wrong? Or is there another or better way to do this?