Dear, the community can someone help me with this error?
I'm currently working in the data that is not in the database and shows "N/A", I'm using the if else statement inside the properties of the item in a dropdown
===My Code===
If(IsBlank(Last(Filter(submission,txt_PartNum_1.Text in 'part#' && "LIMS PHT" in testing).'batch#')),["N/A"],Last(Filter(submission,txt_PartNum_1.Text in 'part#' && "LIMS PHT" in testing).'batch#'))
Thank you
Solved! Go to Solution.
HI @Kint4 ,
So you need to display either the last value or "N/A"? In that case, why use a dropdown? A label then makes more sense.
Hi @Kint4 ,
I assume the error you are receiving is "Expected Table vale"?
To resolve that, you need to remove the Last in the Else statement:
If(
IsBlank(
Last(
Filter(
submission,
txt_PartNum_1.Text in 'part#' && "LIMS PHT" in testing
).'batch#'
)
),
["N/A"],
Filter(
submission,
txt_PartNum_1.Text in 'part#' && "LIMS PHT" in testing
).'batch#'
)
To further simplify this code, you can use a With function:
With({
_items: Filter(
submission,
txt_PartNum_1.Text in 'part#' && "LIMS PHT" in testing
).'batch#'
},
If(
IsEmpty(_items),
["N/A"],
_items
)
)
Thanks for the reply @BCBuizer, but I need to display the latest value of the Batch# itself.
I already try your code, and it works but only displays the first value.
Any other idea?
HI @Kint4 ,
So you need to display either the last value or "N/A"? In that case, why use a dropdown? A label then makes more sense.
Hi, @BCBuizer
I got an error, How do i solve this?
the error is invalid argument type(record), expecting a text value instead
Hi, @BCBuizer .
I already find the solution, I change the isBlank to IsEmpty.
Thank you so much for the help ^^
User | Count |
---|---|
124 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
214 | |
181 | |
140 | |
97 | |
83 |