Add lambda functionality

Gert1
New Member

Add lambda() functionality as it is currently available in Excel Insider Beta version, where the user can define his own named functions with parameters, which can be called recursively.

Gert.

Status Open
0 10 217
10 Comments
Steve
Platinum 4
Platinum 4

Why?

Gert1
New Member

Like all other expressions it can be reused in different parts of the app. Recursion can solve some problems that can not be solved by any other current means known to me?

Steve
Platinum 4
Platinum 4

Why would AppSheet prioritize this request over others, is what I’m getting at. Yours is the first request I’ve seen for this, and it’s a feature that isn’t even publicly available yet.

MultiTech
Gold 4
Gold 4

So you want to be able to code your own functions, and then… use them… in your app…

Can’t you do what you’re talking about with Actions + Automation?

Gert1
New Member

I quickly checked the automation option, but for recursion I’ll have to be able to call the process in itself.

  1. do something
  2. Check if recursion should be called,
    a) if true call this procedure (This does not seem possible?)
    b) if false next step

Does not seem to list the procedure you are working on when adding a step to call procedure.

Gert

Gert1
New Member

This is my problem.
I have a sheet with columns Id, Parent and some data columns.
This creates a tree structure where the branching is “unlimited”, TopNodes, Grandparent, Parents, Children, GrandChildren etc Where I link the current row to it’s parent in the same table. Something like ThisRow.Parent = (Parent).Id.

I want to build a description dynamically (virtual column) like in windows explorer navigation bar C:\users\xxx\yyy\zzz etc. for each row.

It seems only possible with recursion
Somethig like:
ThisRow.Description & LookupTheParent.Description
If it is the topnode do nothing
If Not call the same process

I cant figure out how to do this with automation

Gert

SkrOYC
Gold 5
Gold 5

In general I feel like everyone should enter to the AppSheet platform with an open mind and without any preconceived assumptions of how things should work.
In other words, I think you can make more if you forget everything you know about Excel/Sheets first and then, after eating the whole documentation, you can start applying some of the knowledge you had

Gert1
New Member

Regarding no-code.
If this is considered no-code:
(
COUNT(
TOP(
LIST(
[Answer 1 Player 1],
[Answer 1 Player 2],
…,
[Answer 1 Player N],
),
[Player Count]
)
- LIST("")
)
= [Player Count]
)

Then I am sure this can also be considered no-code:

=LAMBDA(n;a;b;IF(n=1;a;IF(n=2;b;Infib(n-1;b;a+b))))

Where the lambda is named InFib

This calculates the n’th Fibonacci with the starting sequence a;b.

Gert

Steve
Platinum 4
Platinum 4

The add-row examples here all use recursion. You have to be indirect about it.

https://community.appsheet.com/search?q=@steve%20%23tips%20faq%20rows

Status changed to: Open
Pratyusha
Community Manager
Community Manager