Hi guys,
Please help me.
I am using this function
...................................................................
Distinct(
Filter(
tablname,
1stcoumnoftable= ComboBox1_4.Selected.Result
),
2ndcolumvalue
)
..................................................................................................
Now combobox show 2nd column value. but I want display two value
Ex:
2nd column value is name it has phone number . phonenumber saved in another table such table has 2nd column name value how to retirve phone number and show name with phone in combobox.
Please help me
Solved! Go to Solution.
Yes, so the formula I provided will give you what you want.
In context of your example...
ForAll(
Distinct(
Filter(Table1,
country = ComboBox1_4.Selected.Result
),
code
),
{code: Result,
name: LookUp(Table2, code=Result, name)
}
)
Distinct is going to return a distinct list of the values in your 2ndcolumnvalue column.
The problem is - nothing is related to it.
Example, if you have a directory list of people in an organization and the list contains a department column. If you "Distinct" the department to get a list of departments and then say "I want to show the persons phone number with the department" - What person?? If there are 10 people in a department, which one would you show?
So what is the relationship between the distinct value and other records? And, how can you narrow it down to just one?
I have 2column value in another table. it is unique. So I want to get the value another particular column using the unique value (2nd column value) and show the 2nd column value and the particular column value in drop down
Not entirely following what you are stating, but it sounds like each unique/distinct value of the first table has another single value in another table and you want to display both in the dropdown.
I am not sure what other values you want from your dropdown, but at the minimum, your formula would be something like this:
ForAll(
Distinct(
Filter(tablname,
1stcolumnoftable = ComboBox1_4.Selected.Result
)
),
{1stcolumnoftable: Result,
2ndcolumnvalue: LookUp(otherTable, someColumn=Result, 2ndcolumnvalue)
}
)
Table 1
country code
Aus 001
US 001
IN 002
Table 2
code name
001 jio
002 Reliance
Now I get value from table using contry distinct and filter function. it show code value now I want name of code. Then I want to display code as a primary text, name as secondry text.
Yes, so the formula I provided will give you what you want.
In context of your example...
ForAll(
Distinct(
Filter(Table1,
country = ComboBox1_4.Selected.Result
),
code
),
{code: Result,
name: LookUp(Table2, code=Result, name)
}
)
Thank you so much. It works, but the code value is not ascending order. What should I do for that.
You can sort on that column.
Sort(
ForAll(
Distinct(
Filter(Table1,
country = ComboBox1_4.Selected.Result
),
code
),
{code: Result,
name: LookUp(Table2, code=Result, name)
}
),
code
)
User | Count |
---|---|
162 | |
96 | |
76 | |
72 | |
59 |
User | Count |
---|---|
213 | |
166 | |
97 | |
95 | |
77 |