Team,
I have the formula with groupby concept. In this i would like to add virtual incremental number instea of from table,
Below is my codings,
Test1.Run(User().Email,
JSON(With( {TheTable:
Filter(ShowColumns(Dailyinventory,"crf99_sno","crf99_materialdesc","crf99_materialno","createdon","crf99_bbd","crf99_qty"),DateDiff(createdon, Today(),Days) =0)},
ShowColumns(AddColumns(GroupBy(TheTable,"crf99_materialdesc","NewGroup"),
"Materialno",First(NewGroup).crf99_materialno,
"Qty",Sum(NewGroup,crf99_qty),
"Created On",Last(NewGroup).createdon,
"bbd",Last(NewGroup).crf99_bbd,
"Sap-Stock",LookUp(sapstock,material=First(NewGroup).crf99_materialno ,unrestrictedStock)),
"Created On","bbd","crf99_materialdesc","Materialno","Qty","Sap-Stock"))))
Below is my current result,
Exepect result, Show virtual column in first row "Sno"
Solved! Go to Solution.
@AVTS Try this,
Test1.Run(User().Email,
JSON(With(
{TheTable:
ShowColumns(
AddColumns(
GroupBy(
Filter(
ShowColumns(
Dailyinventory, "crf99_sno", "crf99_materialdesc",
"crf99_materialno", "createdon",
"crf99_bbd", "crf99_qty"
),
DateDiff(createdon,Today(),Days) = 0
), "crf99_materialdesc", "NewGroup"
),
"Materialno",
First(NewGroup).crf99_materialno,
"Qty",
Sum(NewGroup, crf99_qty),
"Created On",
Last(NewGroup).createdon,
"bbd",
Last(NewGroup).crf99_bbd,
"Sap-Stock",
LookUp(
sapstock,
material = First(NewGroup).crf99_materialno,
unrestrictedStock
)
),
"Created On",
"bbd",
"crf99_materialdesc",
"Materialno",
"Qty",
"Sap-Stock"
)
},
ForAll(Sequence(CountRows(TheTable)),
Patch(Last(FirstN(TheTable, Value)),{Sno : Value}))
)
)
)
@AVTS Try this,
Test1.Run(User().Email,
JSON(With(
{TheTable:
ShowColumns(
AddColumns(
GroupBy(
Filter(
ShowColumns(
Dailyinventory, "crf99_sno", "crf99_materialdesc",
"crf99_materialno", "createdon",
"crf99_bbd", "crf99_qty"
),
DateDiff(createdon,Today(),Days) = 0
), "crf99_materialdesc", "NewGroup"
),
"Materialno",
First(NewGroup).crf99_materialno,
"Qty",
Sum(NewGroup, crf99_qty),
"Created On",
Last(NewGroup).createdon,
"bbd",
Last(NewGroup).crf99_bbd,
"Sap-Stock",
LookUp(
sapstock,
material = First(NewGroup).crf99_materialno,
unrestrictedStock
)
),
"Created On",
"bbd",
"crf99_materialdesc",
"Materialno",
"Qty",
"Sap-Stock"
)
},
ForAll(Sequence(CountRows(TheTable)),
Patch(Last(FirstN(TheTable, Value)),{Sno : Value}))
)
)
)
@AVTS Hope the solution worked!
Please remember to give a 👍 and accept the solution as it will help others in the future.
Yes . It worked. Thank you .
@AVTS Glad to help!
Please remember to give a 👍 and accept the solution as it will help others in the future.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
183 | |
52 | |
41 | |
40 | |
34 |
User | Count |
---|---|
254 | |
81 | |
71 | |
68 | |
66 |