zoukankan      html  css  js  c++  java
  • Insert new row in collect with powerapps canvas

    Insert A New Row Into A Collection

    Input collection: myScores31a

    FullName Age  TestScore
    David Jones 32 78
    Anne Lisbon 45 92
    Penlope Parra 26 56


    Input record: myScores31b

    FullName Age  TestScore
    Harold Reimer 50 65


    Output collection: mySolution31

    FullName Age  TestScore
    David Jones 32 78
    Anne Lisbon 45 92
    Penlope Parra 26 56
    Harold Reimer 50 65


    Solution code:

    //Create a collection
    ClearCollect(myScores31a,
    {FullName:"David Jones", Age: 32, TestScore: 78},
    {FullName:"Anne Lisbon", Age: 45, TestScore: 92},
    {FullName:"Penelope Parra", Age: 26, TestScore: 56}
    );
    
    //Create a Row
    Set(
        myScores31b,
        {FullName:"Harold Reimer", Age: 50, TestScore: 65}
    );
    
    //Insert a new row into collection code
    ClearCollect(mySolution31,myScores31a);
    Collect(mySolution31,myScores31b);
    
    //Alternate solution
    ClearCollect(mySolution31,myScores31a);
    Patch(
        mySolution31,
        Defaults(mySolution31),
        {FullName:"Harold Reimer", Age: 50, TestScore: 65}
    )
  • 相关阅读:
    NOIP模拟 回文序列
    NOIP模拟 最佳序列
    BZOJ 2783 树
    BZOJ 3631 松鼠的新家
    洛谷 6道简单图论
    NOI模拟 颜色
    NOIP模拟 Game
    BZOJ1415 聪聪与可可
    Codeforces Round #443 (Div. 2) C: Short Program
    20171028洛谷NOIP模拟
  • 原文地址:https://www.cnblogs.com/lingdanglfw/p/14906033.html
Copyright © 2011-2022 走看看