Hi,
I have lookup field and i would like something like when i search and if the person i am looking is not on the record it automatically take you or prompt for new record.
Solved! Go to Solution.
Hi @Ramole ,
Based on the issue that you mentioned, I think there is something wrong with your formula.
According to the needs that you mentioned, I think a Timer control could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:
Set the OnVisible property of current screen to following:
Set(IsStart, false)
Set the OnSelect property of the Company ComboBox to following:
Set(IsStart, true)
Add a Timer control in your screen, set the Duration property to following:
1000
set the Start property to following:
IsStart
set the OnTimerEnd property to following:
If(
!IsBlank(DataCardValue118.SearchText) && Not(DataCardValue118.SearchText in Choices('Shipments '.Company).Value),
Notify("The record you are searching is not existed in Customer List, please added it firstly!", NotificationType.Warning)
)
You could consider add another button (called "New Customer") in your screen, click it to navigate to your New Customer Screen. Within your New Customer screen, add a Edit form connects to your Customer List, use this Edit form to add new record in your Customer List. Set the OnVisible property of the new customer screen to following:
Set(IsStart, false)
Best regards,
Hi @Ramole
Hi @yashag2255
I have SharePoint List called shipments within that list i have a column called company is lookup and lookup is getting data from a List called Customers.
Thanks
Hi @Ramole
In that case, follow the steps:
1) If not created already, create a separate screen, lets say NewCustomerScreen to capture where user can enter details of a new customer.
Add an Edit form on this screen, set default mode property to New. Point it to Customer list and add the appropriate fields.
Form -> OnSuccess -> Refresh(Customers); Back()
Add a button to submit this user, Button -> OnSelect -> SubmitForm(FormName)
2) Now, on the "OnChange" property of the control where the user will input search criteria:
If(!(ControlName.Text in AddColumns(shipments, "LookUPCol", Company.Title).LookUPCol), NewForm(FormName);Navigate(NewCustomerScreen ))
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @yashag2255
I dont know i am getting error please see the screenshot
Thanks
Hi @Ramole
You are getting this error because the AddColumns expects three argument, second argument is the name of custom column that will be created. Can you update the expression to:
If(!(DataCardValue118.Selected.Value in AddColumns(shipments, "LookUPCol", Company.Value).LookUPCol), NewForm(FormName);Navigate(NewCustomerScreen ))
Here, "LookUPCol" is necessary, you can rename it to something of your choice. This is a typo used. You need to replace the LookUPCol at two places in the expression.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @Ramole ,
Based on the issue that you mentioned, I think there is something wrong with your formula.
According to the needs that you mentioned, I think a Timer control could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:
Set the OnVisible property of current screen to following:
Set(IsStart, false)
Set the OnSelect property of the Company ComboBox to following:
Set(IsStart, true)
Add a Timer control in your screen, set the Duration property to following:
1000
set the Start property to following:
IsStart
set the OnTimerEnd property to following:
If(
!IsBlank(DataCardValue118.SearchText) && Not(DataCardValue118.SearchText in Choices('Shipments '.Company).Value),
Notify("The record you are searching is not existed in Customer List, please added it firstly!", NotificationType.Warning)
)
You could consider add another button (called "New Customer") in your screen, click it to navigate to your New Customer Screen. Within your New Customer screen, add a Edit form connects to your Customer List, use this Edit form to add new record in your Customer List. Set the OnVisible property of the new customer screen to following:
Set(IsStart, false)
Best regards,
User | Count |
---|---|
258 | |
111 | |
95 | |
48 | |
41 |