So I have created a bot to automatically generate a pdf for a barcode and fill the row with the file. I have done my best to mimic @MultiTech_Visions method with invoices, but I keep receiving an error. Here are some screenshots:
Basically, I figured out a work around that grabs data within the app to create barcodes that contain some information in the barcode and only display other information. With this method, I can print all our barcodes from the app with ease. I just can’t figure out what’s causing this error or how to fix it.
It look like you are using Google Sheets as the datasource?
What path info is stored in the actual Google sheet datasource?
I don’t understand the question.
I’m using the bot to create the filepath, then populate that file inside the app. Google sheets doesn’t have any path info until the filepath is created, in theory.
Ok, just make sure I understand…you are getting this error when you attempt to view the file?
Yes. After I add a new work order and sync the app, the file name displays as a file in the app and I click on it, then this opens in a new window.
Ok, in your post you refer to that File column as “Work_Order_Barcode_Print”. That File type column must have the correct path info stored in the Google sheet.
Additionally, I believe it’s still true, AppSheet uses the physical folder location of the Google datasource sheet as the root to lookup and retrieve that filename.
There are two things to check:
On G Drive - Is the folder “Work_Order_Barcodes_” underneath the folder that contains the sheet?
Is the path + filename info stored in the sheet for the above file column = “Work_Order_Barcodes_/testbarcode6 - Pending.10/26.2021 12:14:15.pdf”
I’m beginning to understand.
No, I don’t think so. I went to the source and opened the main folder and it does not contain “Work_Order_Barcodes_”. Though that folder does exist in my appsheet data under another app. How do I fix this?
Yes. All file names look correct.
Hmm, ok. This might get a little convoluted. We just need to make sure everything is aligned folder-wise for this app.
CAUTION: Making changes suggested below may temporarily break other path related features in the app. But any issues can be corrected. It’s more important to get the pathing correct for seamless development going forward.
First, please double check the Default app folder path. Make sure it is related to your app AND I highly recommend to make sure your sheet is located in this Default folder. This property can be found as indicated in the image below.
Does the folder in the other app contain your desired files?
If needed:
If you have any other path related features in the app, they may also need to be cleaned up/corrected after applying the steps above.
I will keep this in mind. I think it’s important to mention I have 7 apps that share data sources and this specific one is kept in the folder for the primary app which clients use. If I design the same bot in that app, I will have the barcode files already present by the time the detail page is viewed in the secondary app. I’m going to test this theory before I “break” all my apps.
I tested my theory and it worked! Thanks to your insight and a little rigging of the system, I finally have exactly what I’ve been looking for. Thank you so much for the help!!!
Yes, important to know. In these cases, I typically coalesce the related apps under a common root folder and then base all pathing off that root.
Awesome!
I just did it with one of my other apps and my 2D barcodes and it is working swimmingly! Thanks again!
User | Count |
---|---|
17 | |
11 | |
5 | |
5 | |
5 |