web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / CountRows from DataTable
Power Apps
Unanswered

CountRows from DataTable

(1) ShareShare
ReportReport
Posted on by 60

Hello, how are you guys?

 

I have a DataTable that I am feeding with a SharePoint List and I have a button to download the content shown in the list in a Excel file, but now the idea is to restrict the content (that is also working by using a initial and final date) but now I have set the value to download just 3 record and would like to download the content listed

 

ClearCollect(
 limpia,
 ShowColumns(
 AddColumns(
 FirstN(
 Datos_Generales_DockLogistic,
 3
 ),
 "OrigenValue",
 Origen.Value
 ),
 "Title",
 "OrigenValue",
 "Personal_en_Muelle",
 "Origen",
 "Destino",
 "Descripci_x00f3_n",
 "Fecha_x0020_de_x0020_Viaje",
 "Observaciones",
 "Modo_de_Transporte",
 "Servicio_Requerido",
 "Tipo_x0020_Docklogistic",
 "EstadodelaSolicitud",
 "Asignado_x0020_A",
 "Fecha_x0020_de_x0020_Embarque",
 "Cantidad_Numero_De_Piezas",
 "Categoria",
 "Unidad_x0020_de_x0020_Medida",
 "Numero_de_Serie_del_Equipo",
 "Nombre_del_Cliente",
 "Nota",
 "Plataforma",
 "Nombre_x0020_Del_x0020_Pozo",
 "Vigencia_x0020_del_x0020_Contrat",
 "Email",
 "LineadeProducto",
 "NombredelPasajero",
 "NumerodeContrato",
 "Activo",
 "RFC",
 "BOSIET",
 "Numero_de_Seguridad_Social",
 "Numero_de_Libreta_de_Mar",
 "Objetos_Personales_que_va_a_emba",
 "FechadeIngreso",
 "DockLogistType",
 "Prioridad",
 "Estado_x0020_de_x0020_la_x0020_S",
 "PrioridadEstandardMateriales",
 "Manager",
 "ManagerComments",
 "Status",
 "NombredelCliente",
 "ManagerComments0",
 "Approved",
 "FueradeHorario",
 "Division"
 )
);
Set(
 varJSONDatos2,
 JSON(
 limpia,
 JSONFormat.IncludeBinaryData
 )
);
// PowerAppsbutton.Run(varJSONDatos2);
Set(
 varCSVFile,
 PowerAppsbutton.Run(varJSONDatos2).linkoutput
);
// download the file to Excel
Download(varCSVFile)

I tried to use the CountRows but is not working.

 

How can I fix this?

 

Thanks in advance.

Categories:
I have the same question (0)
  • Abhilash_Swain Profile Picture
    901 on at

    Hi @Emont ,
    Countrows for Datatable is not possible. Instead you use the same source  for countrows.

    In your case you can use the same Sharepoint list .

     

    Please like/accept as solution if it helps. 

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hi @Emont,

     

    You would like to restrict the rows downloaded as you said " restrict the content (that is also working by using a initial and final date)" - what fields are you hoping to restrict this by and under what conditions?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard