I have 3 form inside the screen which are
which select apwprogress from aphid ='some value' and actid ='somevalue'
sample code that can retrieve a value = select apwprogress from app_apweek where actID=235 and aphID =23
Summary : i want to retreive the apwProgress field from app_apweek table
I have some problem of retrieve value from multiple field. I am using Lookup but give an error on it.
LookUp(
// Look for app_apWeek table
app_apWeek,
// Using apHead table(aphid) and activity table(actid) to look for the value
app_apHead.aphID And app_activity.actID,
// Replace the value to the textinput1 field
TextInput1
)
SQL table value
I not sure which part is wrong. Can suggest to me a better way to retrieve value. Thanks
I'm a little confused as to what exactly you are trying to do, but this should get you there.
Looking at the SQL statement...
SELECT * FROM <table_name> WHERE <column1> = 235 AND <column2> = 23
Here's one way to do this in PowerApps:
LookUp(TEST_TABLE, //SELECT the first record
And( //WHERE, AND
actID = Value(txtActID.Text), //column1 = txtActID.Text as INT
aphID = Value(txtAphID.Text) //column = txtAphID.Text as INT
)
)
Where...
actID
and aphID
are INT
data types in SQL and...txtActID
and txtAphID
are Textbox
controls in PowerAppsSee it in action...
Things to remember:
LookUp
here will only bring back the first record even though more records may meet the criteriaFilter
function instead if there are more than 1 record that meets the criteria