Filter('Motor Data Stage 1',StartsWith('MOTOR NAME',TextInput1.Text))
Filter('Motor Data Stage 1',StartsWith(Title2,TextInput1.Text))
I am using this filter option in Text Input box. Motor Data Stage 1 - name of the table in Sharepoint where data is stored.
MOTOR NAME or Title2 is the variable which is to be searched depending on the input in TextInput1.
Error displayed : this rule creates a circular reference between properties which is not allowed powerapps.
Both the above formula are returning error.
Hi @Pawan,
Thank you for further clarifying the code. The circular reference is indeed caused by the TextInput5 Default property that references its own Text property within the Filter statement condition.
To get a better understanding of the requirement: Is there a specific reason why you are using a Filter statement within the Default property? The Default property of a TextInput is used to provide a default text value (that can be overwritten by the user). Additionally, what would you like to achieve by using 2 separate TextInput controls to search the gallery?
Should you want to combine both conditions with a single TextInput control you could use the structure below in the Gallery Items property & set the Default TextInput property back to "".
Filter(
'Motor Data Stage 1',
StartsWith('MOTOR NAME', SearchInput1.Text) || StartsWith(Title, SearchInput1.Text)
)
StartsWith provides a delegable filter condition in case of SharePoint.
Should you want to perform a contains search instead of StartsWith, you can use the structure below instead. Please keep in mind that this is not delegable for SharePoint.
Filter(
'Motor Data Stage 1',
SearchInput1.Text in 'MOTOR NAME' || SearchInput1.Text in Title
)
If this solves your question, would you be so kind as to accept it as a solution. ✔️
If you liked my solution, please give it a thumbs up. 👍
Hi @Pawan ,
Thanks for sharing the Screenshots, now based on your SS we can see you are setting the "Default" property of your Text input with Filter and inside filter you are using the same Textinput5.Text which will create the circular reference error
Can you tell me why are you putting the filter code on Default property of your Text Input to make this work you just need this code on the Items property of your gallery and nothing on the "Default" property of your text input
Filter('Motor Data Stage 1',StartsWith('MOTOR NAME',TextInput1.Text) || StartsWith(Title2,TextInput1.Text))
--------------------------------------------------------------------------------------------------------------------
Please click Accept as solution if my post helped you solve your issue. If the content was useful in other ways, please consider giving it Thumbs Up 😉
LinkedIn- https://www.linkedin.com/in/akshansharma/
TextInput is outside the gallery.
Screenshot is attached of the error message.
Ok thank you for the additional info. The code syntax looks ok and should not result in a circular reference - when only taking the Items property code into account.
Can you confirm that the TextInput1 is outside of the gallery?
The circular reference code should guide us to the specific dependencies that caused the circular reference - would it be possible to (1) provide a screenshot of the full error description and (2) showcase in which property the circular reference occurs?
Thanks!
I mean to say I have tried both the formula and its giving the error - this rule creates a circular reference between properties which is not allowed powerapps.
Both the filter is for same gallery.
I have a table with 152 data rows. With the text entered by user in TextInput1 box - it will filter all the rows out of 152 data rows which contains the word as entered by user in TextInput1.
Hi @Pawan,
To better understand the question, would it be possible to provide additional details on the Filter statements.
Are the 2 Filter statements linked to 2 separate galleries respectively? What would you liked to achieve based on the TextInput1 value?
If this solves your question, would you be so kind as to accept it as a solution. ✔️
If you liked my solution, please give it a thumbs up. 👍
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional