Forum Discussion
calculated column using userelationship
- 9 years ago
Hi Anonymous,
For your screenshot, we can get the username from 'user' table. Becasue the 'user‘ table connect 'Redeem' table indirectly by Discount[discount_materid] and Discount[discount_created]. For example, you can get usename by Discount[discount_created], then you can get Discount[username] in 'Redeem' Table based on Discount[discount_materid] and Redeem[discount_materid]. While your requirement is to get username based on [redeemed_by], the value of Redeem[discount_materid] and Redeem[redeemed_by] are different, so the relationship can not be active.
For your requirement, you can copy a user table(named user1 here), then create a relationship between 'Redeem' and 'user1' table, select user1[username] as value. Please download the file and test.
Best Regards,
Angelia
Hi Anonymous,
What's your mean? There is a middle table TableC btween TableA and TableC? There are one-to-one or one-to-many relationship? Could you please share more details for further analysis?
If there is a active relationship between TableA and TableB, you can use related function direcly as follows.
Best Regards,
Angelia
Table A 1----* (active connection)[key:user_id] Table B
Table B 1----* (active connection)[key:gift_id] Table C
Table C *---1 Table A [key:user_id] (inactive connection).
This is the scenario and I need to get username from table A using key user_id in table C which is currently inactive connection.
Thanks for ur help.Looking forward for your reply.
regards
rishi
- v-huizhn-msft9 years agoMicrosoft Employee
Hi Anonymous,
I add another table3, try to reproduce your scenario, the related function still works in Table3. Please review the following screenshot.
Best regards,
Angelia- Anonymous9 years agoNot applicable
In table 3 also there is user_id field,and I need to point that to table A (here connection is inactive) to get corresponding username from table A.
Regards,
Rishi
- v-huizhn-msft9 years agoMicrosoft Employee
Hi Anonymous,
The related still works fine as follows. And there is no nessary to create a relationship between table1[user_id] and table3[user_id], tabl1 and table3 can be connected by table2.