Hi all, I have table โClientโ ,table โPotential Clientโ and table โPeopleโ , Table โPeopleโ referenced to table โClientโ ,and table โPotential Clientโ
Is there a way when I add new โPeopleโ in form,when we choose โPotential Client IDโ (a reference column), the other column [Client ID] (also ref column with โPeopleโ table, will automatic filled (just as dereference) when โPotential Client IDโ is [Client ID] (potential client become client ).
I think about to have a look up expression for [Client ID]. But dont know how to do.
Thanks !
Solved! Go to Solution.
As per understanding, finding a key that is unique in a table from other values through LOOKUP() could be an issue because there is a possibility of other values being repeated in a table.
Anyway, you may wish to try the below.
Please create a column in the "People " table called [Potential Client Name] with the expression [Potential Client ID].[Potemtial Client Name]
Then the lookup for [Client ID] in the โPeopleโ table can be
LOOKUP([_THISROW].[Potential Client Name], โClientโ, โClient Nameโ , โClient IDโ)
If you could better describe your requirement, the community could help you better.
I will describe It
Table Client
table โPotential Clientโ
Table People
Table โPeopleโ referenced to table โClientโ ,and table โPotential Clientโ . in Form of of table People, Is there a way automatic filled the red cell (The value shoud be ClientID001 )
Hope It clear, thanks
As per understanding, finding a key that is unique in a table from other values through LOOKUP() could be an issue because there is a possibility of other values being repeated in a table.
Anyway, you may wish to try the below.
Please create a column in the "People " table called [Potential Client Name] with the expression [Potential Client ID].[Potemtial Client Name]
Then the lookup for [Client ID] in the โPeopleโ table can be
LOOKUP([_THISROW].[Potential Client Name], โClientโ, โClient Nameโ , โClient IDโ)
Thanks @Suvrutt_Gurjar and @Aurelien , may I ask
why not LOOKUP([Potential Client ID].[Potential Client Name], โClientโ, โClient Nameโ , โClient IDโ) but LOOKUP([_THISROW].[Potential Client Name], โClientโ, โClient Nameโ , โClient IDโ) . I always confused about [_THISROW]
You may want to read this
Short explanation:
In a row evaluation:
LOOKUP([_THISROW].[Potential Client Name], โClientโ, โClient Nameโ , โClient IDโ)
is equivalent to:
LOOKUP([Potential Client Name], โClientโ, โClient Nameโ , โClient IDโ)
ifโฆ[Potential Client Name] is in the same table.
This:
LOOKUP([Potential Client ID].[Potential Client Name], โClientโ, โClient Nameโ , โClient IDโ)
is looking for [Potential Client Name] value, in the table of Clients, based on the value of [Potential Client ID], as it belongs to it. This is called a dereferenced expression.
Sorry may I ask one more question: if I use this expression
LOOKUP([Potential Client ID].[Potential Client Name], โClientโ, โClient Nameโ , โClient IDโ)
then I dont have to create a column in the "People " table called [Potential Client Name] with the expression [Potential Client ID].[Potemtial Client Name]. Right ?
correct.
Great, thank you @Aurelien . Words could not descibe my gratitude for you
You are welcome
Hi @Aurelien,sorry one more question. What if [Potential Client Name] not in the same table, then how to identify [_THISROW].[Potential Client Name] ? Is it the mean the column [Potential Client Name] from the table that referenced to table โPeopleโ ? If that is the case, then we can still donโt need to create a column in the "People " table called [Potential Client Name] with the expression [Potential Client ID].[Potemtial Client Name] right ?
Thanks
Hi @Phong_Lam
I suggest you read this in order to get more information about [_THISROW] and LOOKUP() expression:
Hi @Phong_Lam
You question is unclear to me, @Suvrutt_Gurjar is right and he is suggesting a good solution.
May I ask wahtโs the difference between Client and Potential Client ?
If itโs just a matter of status, like โpotential/realโ, you may want to merge the two tables.
So, your table People would use, instead of LOOKUP(), the expression:
IF([Status]="real", [Client_ID],"")
The reason to do this because below table โPotential Clientโ , and โClientโ have inline view of People related to โPotential Clientโ , and โClientโ. So I just dont want to choose twiceโฆ
Yes. โPotential Clientโ have status โactive client/met/not approachedโฆโ
I am thinking should I merge those 2 tables โฆBecause it have difference references thingsโฆ
You could use Slices.
Client_Potential, row filter condition [status]="not approached"
Client_Met, row filter condition [status]="Met"
Client_Active, row filter condition [status]="Active"
and so on
I donโt get it, can you explain further ?
I mean below table โPotential Clientโ , and โClientโ have inline view of People related to โPotential Clientโ , and โClientโ
Thatโs, I would say, one of the main advantage of it
About the Add: if the slice is read-only, you will not have the Add button (you may preferrently set the update mode to โupdateโ)
User | Count |
---|---|
16 | |
13 | |
8 | |
7 | |
4 |