Closed mainakaich closed 4 months ago
- User won't be downloading anything at this point. Therefore, it will be great if the button is hidden/removed here.
What do you mean with User won't be downloading anything at this point
. The download button is for downloading the errors as excel file.
Would you simply like the option that this button does not appear anyway?
- Continue Anyway looks ambiguous. During file selection, when validation check occurs in the UI level, that time 'Continue Anyway' makes more sense where user still wants to upload despite of errors. But here, nothing happens even if user clicks here. Therefore, it will be great if the button is hidden/removed here.
You can hide this button with the strict
option.
If the user presses close
the error dialog will close and the selected file will dissapear. If the user presses "Continue Anyway" will close the error dialog and the user will able to upload the data to the backend.
I´m sorry but i don´t get your point with "nothing happens".
Can you please try to explain your point further.
- User won't be downloading anything at this point. Therefore, it will be great if the button is hidden/removed here.
What do you mean with
User won't be downloading anything at this point
. The download button is for downloading the errors as excel file. Would you simply like the option that this button does not appear anyway?Mainak - Sorry, I understood the purpose of download at this point. I downloaded the error in excel file. It contains the row number column. But I didn't understand how to fill this. Can you please suggest how to fill the row number so that it is available in the downloaded excel file.
- Continue Anyway looks ambiguous. During file selection, when validation check occurs in the UI level, that time 'Continue Anyway' makes more sense where user still wants to upload despite of errors. But here, nothing happens even if user clicks here. Therefore, it will be great if the button is hidden/removed here.
You can hide this button with the
strict
option. If the user pressesclose
the error dialog will close and the selected file will dissapear. If the user presses "Continue Anyway" will close the error dialog and the user will able to upload the data to the backend. I´m sorry but i don´t get your point with "nothing happens". Can you please try to explain your point further.
Mainak - I am referring the 'Continue Anyway' in the perspective of upload(point 2 mentioned below). As I can see there are 2 possibilities when you are showing this dialog.
- User won't be downloading anything at this point. Therefore, it will be great if the button is hidden/removed here.
What do you mean with
User won't be downloading anything at this point
. The download button is for downloading the errors as excel file. Would you simply like the option that this button does not appear anyway?Mainak - Sorry, I understood the purpose of download at this point. I downloaded the error in excel file. It contains the row number column. But I didn't understand how to fill this. Can you please suggest how to fill the row number so that it is available in the downloaded excel file.
Here is a example how add the row number: https://docs.spreadsheet-importer.com/pages/Events/#example
I just tested it and it worked
Mainak - I am referring the 'Continue Anyway' in the perspective of upload(point 2 mentioned below). As I can see there are 2 possibilities when you are showing this dialog.
- When user just select the file and then the validation check happens against the records in the UI. If any error occurs, the errors are displayed in the dialog. Here 'Continue Anyway' makes sense where user still wants to proceed despite validation error.
- When user clicks on the upload button, then the records are sent to backend and if errors occurred in the backend, they are displayed in the dialog. Here 'Continue Anyway' makes no sense for me as user can't continue anything here. All he can do is to close the dialog. Therefore I was suggesting to remove/hide this button when error occurs during upload.
You´re right, in your case this does not make sense.
In that case the button should be hidden. I´ll fix that.
- User won't be downloading anything at this point. Therefore, it will be great if the button is hidden/removed here.
What do you mean with
User won't be downloading anything at this point
. The download button is for downloading the errors as excel file. Would you simply like the option that this button does not appear anyway?Mainak - Sorry, I understood the purpose of download at this point. I downloaded the error in excel file. It contains the row number column. But I didn't understand how to fill this. Can you please suggest how to fill the row number so that it is available in the downloaded excel file.
Here is a example how add the row number: https://docs.spreadsheet-importer.com/pages/Events/#example
I just tested it and it worked
Dear @marianfoo, thanks so much for sharing the example at https://docs.spreadsheet-importer.com/pages/Events/#example. But how to fill the row number in the error excel sheet when the errors are coming from backend during upload action. I am not very sure is that technically possible or not. Please suggest.
i dont know your specific use case, but you can create a property for the excel row in your data model and send it to the backend and create the backend error with the excel row. If the error is coming to the app you can then create the errors including the excel row. You know what i mean?
Mainak - I am referring the 'Continue Anyway' in the perspective of upload(point 2 mentioned below). As I can see there are 2 possibilities when you are showing this dialog.
- When user just select the file and then the validation check happens against the records in the UI. If any error occurs, the errors are displayed in the dialog. Here 'Continue Anyway' makes sense where user still wants to proceed despite validation error.
- When user clicks on the upload button, then the records are sent to backend and if errors occurred in the backend, they are displayed in the dialog. Here 'Continue Anyway' makes no sense for me as user can't continue anything here. All he can do is to close the dialog. Therefore I was suggesting to remove/hide this button when error occurs during upload.
You´re right, in your case this does not make sense. In that case the button should be hidden. I´ll fix that.
Fixed with version 0.31.6 please check
Was is able to help you?
Hi @marianfoo
Now the continue anyway is not coming during error. But in case of success, the dialog box shows "Upload Error" which is misleading. Can you please change the caption to "Processing Output" to make it generic or dynamically change it "Upload Success" or "Upload Error" depending on the backend response. (Remember here we are sending the backend calls with standalone : true in spreadsheet importer configuration).
Hello @marianfoo
Thanks so much for the solution offered. But I wanted to highlight one more problem here. In the same dialog box, even though the backend is replying with HTTP response 200, I think from the spreadsheet-importer the message is coming like - "Error occurred in Row 1". I am sharing the screenshot and custom controller JS file spreadSheetController.js.txt for your reference.
Starting from line 236 in attached custom controller program where we are showing messages in case backend returns HTTP 200.
"success": function (oData, response) { const success = { title: "All the records were uploaded successfully", group: true, row: 1, ui5type: "Success" }; errorArray.push(success); event.getSource().addArrayToMessages(errorArray); resolve(); this._view.getModel().refresh(); //Refresh the list }.bind(this), // callback function for success
If you want to show a success message to the user you can do it like that:
const success = {
title: "All the records were uploaded successfully",
group: false,
ui5type: "Success"
};
does this help with your case?
Hello @marianfoo,
Thanks so much. This works now, I can close the issue. Just one question - what group : false means here? What is the purpose of group here.
It's for grouping the same error that occurs for several rows.
Generic messages like yours don't need grouping because there are not for a specific row.
Thanks for reporting your issues!
OData Version
OData V4
Draft
Yes
Scenario
Fiori Elements
Environment
BTP ABAP
UI5 Spreadsheet Component
cc.spreadsheetimporter.v0_31_5
What happened?
The buttons 'Download' and 'Continue Anyway' are available during upload failure as shown here. But that doesn't give good user experience because -
Relevant log output
Spreadsheet Component Init
Manifest