Skip to main content
November 17, 2022
Question

Export data from CSV file and Import in to Read only grid

  • November 17, 2022
  • 2 replies
  • 0 views

Hi 

I am working on the scenario in which I am using the milestone component.

Step 1, Uploading CSV file through the file upload component then click the next button of the milestone component.

In Step 2 I want to fetch data from a CSV file and want to show it on a read-only grid.

So If anyone knows how to fetch data from a CSV file and upload it to a read-only grid please let me know.

Many Thanks in advance.

2 replies

vinays024987
November 21, 2022

Hi,

It depends on your approach.

1. If you want to dump data into database, You can use "Import csv to database" smart service and then display into grid by a!queryEntity.

2. If you are saving the file into your environment, You can use "previewcsvforimport()" as:

previewcsvforimport(
document: todocument(ri!documentId),
delimiter: ",",
charset : "UTF-8",
numberOfRows: ri!numberOfRows
)

3. If you are using the csv text, then this should work:

a!forEach(
items: split(ri!csvText,char(10)),
expression: split(fv!item,",")
)

May 19, 2023

how to show csv data in read only grid , plz give me  a detail example. I got first line of data . I try to use a!forEach but got error