Posts

Showing posts from April, 2023
 Concat(     GroupBy(         'CollectionName',         "IdentityColumn",         "GroupedData",         "NameColumn"     ),     If(         CountRows("GroupedData") = 1,         "GroupedData[@NameColumn]",         Concatenate(             "GroupedData[@NameColumn]",             ", ",             "GroupedData[@NameColumn]",             GroupedData,             ", "         )     ),     " " )
To convert a column of folder paths into a tree structure of rows, you can use a combination of Excel formulas and VBA code. Here are the steps to follow: Insert a new column to the right of the column with the folder paths. In the first cell of the new column, enter the formula =LEN(A1)-LEN(SUBSTITUTE(A1,"\","")) , where A1 is the first cell in the column with the folder paths. This formula calculates the number of backslashes in the folder path. Copy the formula down the entire column to calculate the number of backslashes in each folder path. Insert a new sheet in the workbook and name it "Tree". In the "Tree" sheet, create headers for the columns "Level 1", "Level 2", "Level 3", etc. up to the maximum number of levels in your folder paths. For example, if your folder paths have a maximum of 3 levels, create columns for "Level 1", "Level 2", and "Level 3". In the first cell of each co
 async function getListItems(listUrl: string) {   const apiUrl = `${listUrl}/items?$top=5000`;   const items = [];   let skipToken = null;   do {     const url = skipToken ? `${apiUrl}&$skiptoken=${encodeURIComponent(skipToken)}` : apiUrl;     const response = await fetch(url, {       headers: {         Accept: "application/json;odata=nometadata"       }     });     const data = await response.json();     items.push(...data.value);     skipToken = data["@odata.nextLink"] ? data["@odata.nextLink"].split("&$skiptoken=")[1] : null;   } while (skipToken);   return items; } const listUrl = "https://<your-site-url>/_api/web/lists/getByTitle('<your-list-title>')" ; const items = await getListItems(listUrl); const filteredItems = items. filter ( item => { return filters. every ( filter => item[filter. property ] === filter. value ); }); const filters = [ { property : "Status" , valu