Using Calculated/Look ups with conditions

%3CLINGO-SUB%20id%3D%22lingo-sub-2082204%22%20slang%3D%22en-US%22%3EUsing%20Calculated%2FLook%20ups%20with%20conditions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082204%22%20slang%3D%22en-US%22%3E%3CP%3EExcuse%20my%20lack%20of%20knowledge%20but%20my%20past%20life%20I%20was%20developer%20but%20on%20relational%20dbs.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20get%20lists%20are%20very%20Excel%20oriented%2C%20but%20I'm%20trying%20to%20put%20some%20relations%20between%20my%20lists%20as%20like%20Db%20Tables%20and%20wondering%20how%20best%20to%20do%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20a%20simple%20example%20...%20I%20have%202%20lists%20Client%20Projects%20and%20Project%20Orders%2C%20so%20when%20I%20raise%20a%20Project%20Order%20I%20only%20want%20to%20see%20the%20%22Active%22%20Client%20Projects.%26nbsp%3B%20I%20done%20this%20by%20setting%20up%20a%20new%20column%20on%20the%20Project%20Order%20that%20calculated%20if%20the%20Client%20Projects%20was%20%22Active%22.%26nbsp%3B%20Worked%20great%20when%20adding%20a%20new%20item%2C%20and%20I%20saw%20the%20Client%20Project%20Name%20however%20when%20the%20Client%20Project%20was%20%22Closed%22%2C%20in%20the%20list%20view%20the%20Client%20Project%20Name%20then%20disappeared.%26nbsp%3B%20Which%20obviously%20I%20know%20why%20as%20that%20Column%20only%20gives%20that%20information%20when%20%22Active%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20know%20with%20my%20background%20I%20can%20do%20this%20somehow%2C%20but%20how%20is%20the%20best%20way%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2082308%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20Calculated%2FLook%20ups%20with%20conditions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082308%22%20slang%3D%22en-US%22%3EThere%20might%20be%20a%20different%20way%20of%20doing%20this%20(thank%20you%20Microsoft%20for%20offering%20100%20different%20ways%20to%20do%20a%20thing%20%3AD)%20but%20personally%20I%20would%20look%20to%20Power%20Automate%20to%20work%20in%20concert%20with%20your%20lists.%20You%20would%20create%20Flows%20where%20all%20your%20triggers%20would%20be%20'when%20a%20new%20list%20item%20is%20created'%20OR%20'list%20item%20is%20updated'%20(or%20deleted).%20Then%2C%20for%20example%2C%20when%20an%20order%20is%20added%20(no%20matter%20how%20you%20add%20the%20order%20info%20to%20the%20list)%2C%20you%20write%20the%20flow%20to%20find%20the%20corresponding%20client%20info%20on%20the%20client%20list%20(have%20it%20search%20for%20the%20matching%20values%20like%20the%20name%20or%20id%23)%20and%20then%20have%20it%20add%20the%20info%20you%20want%20from%20the%20client%20list%2C%20like%20client%20ID%2C%20or%20name%2C%20to%20the%20order%20item%2C%20maybe%20even%20auto%20add%20order%20status%20as%20Active%2C%20and%20vice%20versa%2C%20so%20the%20order%20%23%20and%20status%20of%20order%20gets%20added%20to%20the%20client%20list%20item.%20You%20can%20set%20it%20so%20if%20it%20doesn't%20find%20a%20match%2C%20you%20could%20tell%20it%20to%20add%20something%20like%20'add%20new%20client'%20(or%20get%20crazy%20and%20have%20it%20auto%20add%20a%20new%20client!)%20If%20you%20go%20this%20route%2C%20you%20will%20want%20to%20create%20the%20columns%20for%20the'%20new'%20relational%20info%20you%20want%20to%20see%20before%20hand%2C%20so%20PA%20knows%20where%20to%20put%20the%20selected%20info%2C%20and%20write%20the%20flows%20in%20Automate%20and%20your%20tables%20are%20effectively%20tied%20together.%20You%20could%20even%20have%20set%20it%20up%20so%20PA%20sends%20you%20an%20email%20or%20notification%20every%20time%20a%20new%20item%20is%20added%20to%20your%20list%2C%20or%20maybe%20when%20an%20order%20status%20is%20changed%20to%20help%20you%20manage%2Ffollow%20the%20changes%20when%20they%20happen.%20I%20hope%20this%20helps!%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2082318%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20Calculated%2FLook%20ups%20with%20conditions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082318%22%20slang%3D%22en-US%22%3EThanks%3CBR%20%2F%3E%3CBR%20%2F%3EI%20think%20I%20understand%20you%20but%2C%20for%20me%20with%20my%20background%20you%20are%20effectively%20updating%20the%20item%20twice%20...%20once%20to%20create%20it%2C%20being%20selective%20with%20the%20look%20up%2C%20and%20then%20secondly%20to%20overwrite%20without%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
New Contributor

Excuse my lack of knowledge but my past life I was developer but on relational dbs.

 

So I get lists are very Excel oriented, but I'm trying to put some relations between my lists as like Db Tables and wondering how best to do this.

 

As a simple example ... I have 2 lists Client Projects and Project Orders, so when I raise a Project Order I only want to see the "Active" Client Projects.  I done this by setting up a new column on the Project Order that calculated if the Client Projects was "Active".  Worked great when adding a new item, and I saw the Client Project Name however when the Client Project was "Closed", in the list view the Client Project Name then disappeared.  Which obviously I know why as that Column only gives that information when "Active".

 

So I know with my background I can do this somehow, but how is the best way?

4 Replies
There might be a different way of doing this (thank you Microsoft for offering 100 different ways to do a thing :D) but personally I would look to Power Automate to work in concert with your lists. You would create Flows where all your triggers would be 'when a new list item is created' OR 'list item is updated' (or deleted). Then, for example, when an order is added (no matter how you add the order info to the list), you write the flow to find the corresponding client info on the client list (have it search for the matching values like the name or id#) and then have it add the info you want from the client list, like client ID, or name, to the order item, maybe even auto add order status as Active, and vice versa, so the order # and status of order gets added to the client list item. You can set it so if it doesn't find a match, you could tell it to add something like 'add new client' (or get crazy and have it auto add a new client!) If you go this route, you will want to create the columns for the' new' relational info you want to see before hand, so PA knows where to put the selected info, and write the flows in Automate and your tables are effectively tied together. You could even have set it up so PA sends you an email or notification every time a new item is added to your list, or maybe when an order status is changed to help you manage/follow the changes when they happen. I hope this helps!
Thanks

I think I understand you but, for me with my background you are effectively updating the item twice ... once to create it, being selective with the look up, and then secondly to overwrite without?

Yeah, you could look at it that way. You are creating the entry, and using a flow to immediately 'update/modify' a targeted cell (or cells) on said entry. Explaining/setting up seem not so pretty, but in action it pretty straight forward/hands off.
(to clarify, on the 'update' you aren't overwriting anything/any cells you don't want to update/overwrite... You would leave those cell refs in the flow blank and flow would ignore them and the original info from initial creation would remain in tact ).