Powerapps: Get table data from a JSON array

Diskutiere und helfe bei Powerapps: Get table data from a JSON array im Bereich Microsoft Office im Windows Info bei einer Lösung; I have a JSON array with data to fill into a gallery or use anyway as table. I'm not be able transform this data from this "Text" format to the for me... Dieses Thema im Forum "Microsoft Office" wurde erstellt von Michael.Mueller.MM, 1. Juli 2020.

  1. Powerapps: Get table data from a JSON array


    I have a JSON array with data to fill into a gallery or use anyway as table.
    I'm not be able transform this data from this "Text" format to the for me unknown table format.

    Example data:
    [ { "Count": 1,"Description": "Intel Celeron G4900 6Gen, DualCore, 4GB RAM, 500GB HDD","Ordernumber": "5FC45EC#ABD","Model": "HP ProDesk 600 G4 Tower","Price": 256.59, },
    {"Count": 7,"Description": "DVD Drive extern","Ordernumber": "F2B56AA","Model": "HP External USB DVDRW Drive","Price": 21.63, } ]

    Who has any suggestion?
    Thanks in advance

    Michael
     
  2. K_Holland Win User

    How can I get ride of the white space on my forms?

    The space beside the form fields! You can see about 50% is white space. I've edited it using JSON rather than powerapps FYI.
    <br />
  3. Andreas Killer Win User

    SummeWenns mit Unikaten auf der Basis eines Dictionary

    diese weiterführenden Informationen sind sehr hilfreich. Aber ich muss mir diese erst an Hand Deiner Erklärungen erarbeiten.
    Okay, freut mich zu hören. Dann leg ich nochmal ein einfaches funktionierendes Beispiel nach, wo man nur mit einem Array und ohne Formeln in der Tabelle auskommt.

    Kopier den Code unten mal in eine neue Datei und lass Test einfach mal laufen. Wenn der Code anhält, dann kuck mal in das Tabellenblatt, das sind die Ausgangsdaten.

    Dann debug den Code mal und schau Dir die Kommentare an, so könntest Du es auch machen. Ist sogar vielleicht einfacher zu verstehen?

    Naja, wer die Qual hat... :))

    Andreas.

    Option Explicit

    Option Compare Text

    Sub Test()

    Dim Data

    Dim i As Long, j As Long



    'Zufallsdaten generieren

    ReDim Data(1 To 20, 1 To 5)

    For i = 1 To UBound(Data)

    For j = 1 To UBound(Data, 2)

    Data(i, j) = Int(Rnd * 9) + 1

    Next

    Next

    'Überschriften

    For j = 1 To UBound(Data, 2)

    Data(1, j) = Chr(64 + RandomUnique(1, UBound(Data, 2)))

    Next

    'In die Tabelle

    Range("A1").Resize(UBound(Data), UBound(Data, 2)) = Data



    'Angenommen ich vergesse jetzt mal was ich grad gemacht habe

    Stop



    'Ich weiß das in der 1. Zeile der Daten die Überschriften steht

    'Und ich soll A+C*E für jede Zeile rechnen



    Const MyF = "=A+C*E"

    Dim A As Long, C As Long, E As Long

    Dim Temp As String



    'Den Datenblock einlesen

    Data = Range("A1").CurrentRegion



    'Jetzt suche ich im Array die Überschriften und merke mir die Spalte

    For j = 1 To UBound(Data, 2)

    Select Case Data(1, j)

    Case "A": A = j

    Case "C": C = j

    Case "E": E = j

    End Select

    Next



    'Spalte hinzufügen

    ReDim Preserve Data(1 To UBound(Data), 1 To UBound(Data, 2) + 1)

    'Überschrift

    Data(1, UBound(Data, 2)) = "Ergebnis " & MyF

    For i = 2 To UBound(Data)

    'Die Formel zusammenbauen

    Temp = MyF

    Temp = Replace(Temp, "A", Data(i, A))

    Temp = Replace(Temp, "C", Data(i, C))

    Temp = Replace(Temp, "E", Data(i, E))

    'Und ausrechnen

    Data(i, UBound(Data, 2)) = Application.Evaluate(Temp)

    Next



    'In die Tabelle zurück

    Range("A1").Resize(UBound(Data), UBound(Data, 2)) = Data

    End Sub

    Private Function RandomUnique(ByVal Lo As Long, ByVal Hi As Long, _

    Optional Reset As Boolean = False) As Long

    Static Dict As Object 'Dictionary

    'Init dictionary if necessary

    If Dict Is Nothing Then Set Dict = CreateObject("Scripting.Dictionary")

    'Remove all used numbers if forced from outside

    If Reset Then Dict.RemoveAll

    Do

    'Get a random number

    RandomUnique = Int((Hi - Lo + 1) * Rnd) + Lo

    'Already used?

    Loop Until Not Dict.Exists(RandomUnique)

    'Remember it

    Dict.Add RandomUnique, 0

    'Automatic reset if all numbers used

    If Dict.Count > Hi - Lo Then Dict.RemoveAll

    End Function
  4. Andreas Killer Win User

    Excel: Inhalte aus Mappe 1 in Mappe 2 automatisch kopieren unter der Foraussetzung das die Inhalte von 2022 sind.

    Nach Farben kannst Du nicht filtern. Schreib in Spalte B r für rot, b für blau, s für schwarz und verwende eine Bedingte Formatierung, das geht und ist für die Handhabung auch einfacher.
    Die eingeschobenen Zeilen mit der Jahreszahl machen das Leben nur unnötig schwer, bitte löschen. Wenn man die Daten dann als Tabelle formatiert kann man sich sehr einfach nach dem Jahr filter, mit z.B. einen Datenschnitt.
    Create and format tables - Office Support
    Use slicers to filter data - Office Support
    Nach diesen Änderungen erübrigt sich Erfahrungsgemäß meistens das Aufsplitten in mehrere Dateien. Andernfalls benutze Power Query und importiere die Daten aus der Hauptmappe und setze die benötigten Filter gleich dort. Kuck mal hier, das geht auch mit Dateien:
    Import from an Excel Table
    Bei Änderungen kann man diese Mappe nun via Daten \ Alles Aktualisieren updaten oder in der Query so einstellen das dies automatisch beim Öffnen der Datei passiert.
    Aber wie gesagt, aufsplitten ist, idR unnötig. Lade die Daten ggf. in ein Datenmodell (auch mit PQ und filtere ggf. Daten heraus) und lade die restlichen Daten in ein Datenmodell, das kann man dann zur Datenanalyse verwenden, in z.B. Pivottabellen.
    Create a Data Model in Excel
    Create a PivotTable to analyze worksheet data - Office Support
    Andreas.
  5. Andreas Killer Win User

    Please help me with setting up a tool to analyze a food frequency questioner

  6. Wolf Spohr Win User

    How can I get ride of the white space on my forms?

  7. User Advert


    Hi,

    willkommen im Windows Forum!
Thema:

Powerapps: Get table data from a JSON array - Microsoft Office

Die Seite wird geladen...

Powerapps: Get table data from a JSON array - Similar Threads - Powerapps Get table

Forum Datum

Get the data part of a stuctured column in VBA

Get the data part of a stuctured column in VBA: This will get me a column of data from a structred tableFunction GetNameColumn As Range Dim ws As Worksheet Dim tbl As ListObject Dim colName As ListColumn Set ws = SheetsSheetName Set tbl =...
Microsoft Office 17. Oktober 2024

"Data from Picture" button is missing

"Data from Picture" button is missing: Dear all, I would like to insert some data from a picture. I found the following article about it....
Microsoft Office 16. Januar 2024

Display a clickable table in a modern sharepoint

Display a clickable table in a modern sharepoint: Hey guys,I have an old classic sharepoint with a nice clickable overview of the different phases in a project on my main page. You are able to click on each step and get templates and further...
Microsoft Office 17. Juli 2023

PowerApps

PowerApps: Hallo,ich sehe gerade, dass Fragen zum Erstellen von MS PowerApps-Code grundsätzlich zum englischsprachigen Forum verwiesen wird. Gibt es dazu noch keine deutsch-sprachige Alternative?...
Microsoft Office 13. Juli 2021

Get table data from a JSON array

Get table data from a JSON array: I have a JSON array with data to fill into a gallery or use anyway as table. I'm not be able transform this data from this "Text" format to the for me unknown table format. Example data: [ {...
Microsoft Office 1. Juli 2020

How to consolidate in one Pivot Table data from more excel sheets

How to consolidate in one Pivot Table data from more excel sheets: I have launched PowerPivot and managed to Import 4 tables Jan Apr billings, but I cannot run a Pivot where I can Show a Consolidated table for each customer the whole 4 months billings Could you...
Microsoft Office 5. Mai 2020

Data gets corrupted when copied from surface book to usb or sd card

Data gets corrupted when copied from surface book to usb or sd card: When I copy files from my Surface book to any other device, one or more of three Things happen: some files are missing, some files are freu and cannot be ipened on any other device or i get an...
Surface 9. Dezember 2018
Powerapps: Get table data from a JSON array solved
  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Auf dieser Website werden Cookies für die Zugriffsanalyse und Anzeigenmessung verwendet.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.