I'm currently trying to simply set the Default value of a Dropdown in an Edit Form (Form is opened and the Dropdown should have a pre-selection). Even though I did extensive research I couldn't find a solution for a Sharepoint choice field (as I don't know how to find the ID's of those choices and how to reference it?
I have the DropDown with the Selections from Sharepoint ("Inland", "Ausland") and would like to be the Default for a blank form to be "Inland".
Thank you so much for your help.
Solved! Go to Solution.
Good news @vwyankee
I had another go with your code today and it worked. The only think I can think of that I did differently was that previously I still had the old code at the bottom of OnStart. I didn't think this would affect it as it had different variable names.
Anyway, I'm back on track now.
Perhaps there wasn't a semi-colon to separate the previous code you had below it. Regardless, glad to hear it is working and it's not some MS super mysterious anomaly why it doesn't work for you but does anyone else. Those will come up. 😂
I feel like I'm nearly there. Can you please help with one more thing? I want to slightly change your recommendation for the visibility of a datacard in FormMode.New based on whether the current user is a customer. In plain speak I want - If (Form Mode is new and if gvCustomer is not blank), then visible, else hidden)
On the Visible property I've tried this but it doesn't like it.
If(FormMfrEntry.Mode=FormMode.New && If(!IsBlank(gvCustomer),true,false))
@vwyankee You helped previously with adding a search box and a sort ascending/descending button on a gallery. How do I combine this with the functionality that if gvCurrentUser = "FIW Approver" then all items should be shown, but otherwise only the gvCustomer values should be shown?
@GraemeNZ - I didn't help with the search and sort, but you can combine them with the condition on what to show like this - note, I condensed the statement so the condition on what to filter is within one SortByColumns statement instead of having them split out into two full statements. I also added in some comments to help clarify what's happening.
//If current user is approver show all, else filter by gvCustomer SortByColumns( Search( If( gvCurrentUser = "FIW Approver", 'testManufacturers List', Filter( 'testManufacturers List', Customer.Value = gvCustomer ) ), //search from text input box on Title column tiSearchBox.Text, "Title" ), //sort by Title column "Title", //sort order If( SortDescending, Descending, Ascending ) )
If you want to have a sort for each column in your gallery you can do that with a variable as well. @WonderLaura does a great job with the step by step in this video from one of her Power Hour sessions that you can incorporate.
Thanks @vwyankee that worked just fine when I replaced the name of the search box with the name in my app.
Thanks also for the post to @WonderLaura - it turns out I've been watching that video to learn how to filter my gallery, and I've watched a few of her other very helpful videos also. Thanks Laura!
Hi @vwyankee - related to this is a Flow issue I'm having. I don't know how familiar you are with Flow, but I'd be interested in any insight you have. See: https://powerusers.microsoft.com/t5/Building-Flows/Check-if-a-date-is-blank-in-SharePoint-list/m-p/1...