Continuing the discussion from New INPUT() function โ binding dynamic inputs to a data change action:
LOOKUP(SELECT(
is the equivalent of:
ANY(SELECT(SELECT(
@Rifadm817 you might try the following, it should be easier on your system while accomplishing the same result:
LIST(MAXROW(Job Items, _RowNumber, [job ID] = [_ThisRow].[job ID]))
If youโve got your tables connected with references, then on the Parent level you will have a list of [Related Job Items]
LIST(INDEX([Parent_Ref].[Related Job Items], COUNT([Parent_Ref].[Related Job Items])))
Hey, Hope you are doing good.
I actually always use LINKTOFORM() to go to form. Then do the normal data entry part. This post is just to demonstrate INPUT (). Some use cases like add to cart when user/client does not prefer moving out of one screen to another form and then coming back to same view after saving the form is really a big NO !
Clients prefer something like this always. Adding a row to inline view without changing from one view to another. Right now with INPUT() I am able to do somewhat close to the video above.
Here is another way I do it. This also take us to another screen to change everything.
I have never tried this because I achieved everything using existing Lookup(). I will surely try. I never knew it would effect the efficiency. Does it effect the update time or sync time ?
In this instance your original nested formulas wouldnโt, because itโs inside an action.
If you had a formula like that living inside a Virtual Column, then the sync time would be affected - taking longer and longer the bigger your data gets.
Using MaxRow() makes use of efficiencies built into the platform, AppSheet keeps indexes and things in the background the weโre not privy to.
Am I understanding it wrong here or Appsheet just confusing me ? When I use MAXROW() is it basically the SELECT() ?
I am under the impression that MAXROW is simply a wrapper for a more complex SELECT.
I have strong doubts about this statement. Do you have anything to back it up?
This is what I was told many years ago when working with app sheet support to increase the efficiencies of an app. I was doing things similar to nested selects and lookups - they pointed me in that direction.
I would assume things wouldnโt have changed, though I could be wrong.
Best
Matt
EDIT: but after seeing that screen shot of the horrible looking nested select from that MAXROW(), got me thinkinโฆ
Please provide a sample of this expression in MAXROW() version.
I would also greatly benefit from an example alternative to MAXROW()!
If I were trying to find the last item entered into an orderโฆ
On the Orders table, I would already have a reverse reference of all the [Related Order_Items]
So really what I need to do is get the last item out of that listโฆ
INDEX([Related Order_Items], COUNT([Related Order_Items]))
If I were trying to find the first item of the order - alternative to MINROW()
INDEX([Related Order_Items], 1)
If I were trying to find the โoldest order still pending shipmentโ - another alt to MINROW()
I would have created an โOrders_Pending_Shipmentโ slice - to hold a list of all the orders that are still in the โpending shipmentโ status
So really all I need to do is put this slice in order by timestamp, and pull the first out out of the list.
Index(OrderBy(Orders_Pending_Shipment[OrderID], [Order_Timestamp]), 1)
If were trying to find the newest order still pending shipment
INDEX(OrderBy(Orders_Pending_Shipment[OrderID], [Order_Timestamp]), COUNT(Orders_Pending_Shipment[OrderID))
or
Index(OrderBy(Orders_Pending_Shipment[OrderID], [Order_Timestamp], true), 1)
I also have this issueโฆmy sync time is getting longer and longerโฆI need an alternative.
this is in a format rule to lookup duplicate value when entering another record.
ISNOTBLANK(
FILTER(
โMASTER LOGโ,
(AND([STATUS]<>โCANCELLEDโ,NOT(CONTAINS([STOCK #], โINCโ)),[_THISROW].[STOCK #] = [STOCK #]))
)
any help with this?
I donโt believe that expressions in Format Rules have any affect on sync times. They just affect how long a view takes to load onto the screen when you switch to it.
Use the performance analyzer to see exactly where your long sync times are coming from.