Forum Discussion
Syndicate_Admin
Administrator
3 years agoAdd rows to table that repeats unique column countdown starting from value in another column, for a set number of times.
Having trouble figuring out the direction I need to go for this table I want to make. Will continue to research functions but wanted to pose the general question to the community. I have this table...
AlienSx
Super User
3 years agoplease give an example of toollife and currentlife values combination that gives wrong result (or error).
Syndicate_Admin
Administrator
3 years agoI got this to work now by adjusting the custom function like so:
fx_tools_add_positions = (r as record, parts as number) as record =>
if r[Currentlife]=r[Toollife]
then
Record.AddField(
r,
"positions",
List.InsertRange(
List.Numbers(
r[Currentlife]+1,
Number.RoundAwayFromZero(parts / r[Toollife]),
r[Toollife]),0,
List.Numbers(1,1)
)
)
else
Record.AddField(
r,
"positions",
List.Numbers(
r[Currentlife]+1,
Number.RoundAwayFromZero(parts / r[Toollife]),
r[Toollife])
)
,