Hi guys I am new to powerapps
Please help me in this situation I have a sharepoint list named EID in that choice column is there containing old and new in powerapps i have tax regime dropdown for that i have used this old and new values in dropdown and in edit form it shows tax regime with dropdown of old and new values after clicking submit it goes history page showing tax regime old or new based on user selected in dropdown. My Requirement if user select old regime in dropdown in history page also it will shows old regime but after if he want to add one entry in edit form it should show old regime only in default value of dropdown . sameway if user select new regime in dropdown in history page also it will shows newregime but after if he want to add one entry in edit form it should show new regime in default value of dropdown . Can anyone help me in this situation.
I have used this formula in default property of dropdown but it doesnot work
If(IsBlank (Lookup(Eid, EmployeeMail = Officee365Users.MyProfileV2().Mail)),
"old", Lookup(Eid, EmployeeEmail = Office365Users.MyProfileV2().Mail))
Thanks and Regards
Aldous
Hi @v-mengmli-msft I have tried above formula in default selected items i have selected old regime and after submit it the old regime entry stored into sharepoint list EID but after again i create new declaration it show both old and new regime in dropdown but i want to show in old regime because i already have old regime entry in sharepoint list sameway i want to show new regime if new regime entry already in sharepoint list. still i didnt get proper output can you help me meanwhile items property of dropdown i have this formula Choices([@EID]. 'Tax Regime')
Hi @Aldous345 ,
It is just in my previous reply, I edited it.😀
Well, it seems that I didn't make it clear.
If(IsEmpty(Filter(EID,'Created By'.Email=Office365Users.MyProfileV2().mail)),Filter(Choices([@EID].'Tax Regime'),Value="Old"), Last(SortByColumns(Filter(EID,'Created By'.Email=Office365Users.MyProfileV2().mail),"ID",SortOrder.Ascending)).'Tax Regime')
If it shows any errors, please attach it in your next reply.
Best regards,
Rimmon
Hi @v-mengmli-msft Can you Send me the new formula please
Hi I am got this error
I am got this Error The function 'Filter' has some invalid arguments, Name isnot recognized 'Choices' isn't recognized, Invalid use of '.' , Name isn't valid. 'Value' isn't recognized, Incompatible types for comparison. These types can't be compared : Error,Text These are the errors i am facing.
Hi @Aldous345 ,
Please try "Created By" column if you don't have EmployeeEmail column.
If(IsEmpty(Filter(EID,'Created By'.Email=Office365Users.MyProfileV2().mail)),Filter(Choices([@EID].'Tax Regime'),Value="Old"), Last(SortByColumns(Filter(EID,'Created By'.Email=Office365Users.MyProfileV2().mail),"ID",SortOrder.Ascending)).'Tax Regime')
If above formula shows error, hope you will attach some screenshots about the error.
Best regards,
Rimmon
Hello
Still I am getting Error and I dont have EmployeeEmail Column can you Please help
Hi @Aldous345 ,
This is because you are using combo box but not drop down. They have some differences.
I recommend you try DefaultSelectedItems property. By the way, what is type of EmployeeMail? If it is lookup column or choice column, you can try adding ".Value" after the EmployeeMail.
If(IsEmpty(Filter(EID,EmployeeEMail=Office365Users.MyProfileV2().Mail)),Filter(Choices([@EID].'Tax Regime'),Value="Old"), Last(SortByColumns(Filter(EID,EmployeeEMail= Office365Users.MyProfileV2().mail),"ID",SortOrder.Ascending)).'Tax Regime')
The above formula will populate combo box with "Old" if current user hasn't created an item. Otherwise, the 'Tax Regime' of last created item by current user will be populated.
Best regards,
Rimmon
Hi
Sorry I am getting Error can you please update for when new is selected in dropdown
Hi can you help me I am getting error in formula
This is my preview page
this is my items page in dropdown
This is my code in default property of dropdown but i got error lookup function is not supported and employee mail isnot recognized and my requirement i also want to update the formula samewise for if new value selected in dropdown
if picture is not visible this is formula:
If(IsEmpty(Filter(EID,EmployeeEMail=Office365Users.MyProfileV2().Mail)),"old", Last(SortByColumns(Filter(EID,EmployeeEMail= Office365Users.MyProfileV2().mail),"ID",SortOrder.Ascending)).'Tax Regime')
Please help me to resolve this issue
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional