I have inherited a PowerApp from my colleague which includes a gallery that uses a sharepoint list as its datasource. The purpose of the gallery is to allow Admin users to search for all the submitted forms in their department (IT, Finance etc...), however not all the data is showing in the gallery. The data collected should be dated from December 2018 to the current date (December 2019), but the data stops at October 2019 instead.
I think this is due to the radio button that has been added to the screen. The radio button should enable the admins to filter the gallery data depending on form status. See below formula:
SortByColumns(
If(
Radio1_1.SelectedText.Value = "All",
'IT Forms',
Radio1_1.SelectedText.Value = "Approved",
Search(
'IT Forms',
"Approved",
"Status"
),
Radio1_1.SelectedText.Value = "Rejected",
Search(
'IT Forms',
"Rejected",
"Status"
),
Radio1_1.SelectedText.Value = "Form Number",
Filter(
'IT Forms',
ID = IDInputText_1.Text
),
Radio1_1.SelectedText.Value = "Awaiting Approval",
Search(
'IT Forms',
"Awaiting",
"Status"
),
Radio1_1.SelectedText.Value = "Form Type",
Filter(
'IT Forms',
Title = ITFormType.Selected.Result
)
), "Created", Descending)
But as stated above, not all the data is being collected. Although I have found that up-to-date data is collected when I bypass the radio button and use the below formula:
SortByColumns('IT Forms',"Created",Descending)
I can use this as a work around for now, but I will need to add the radio button back onto the screen as soon as possible. I have increased the Data Row Limit in Settings from 500 to 2000, but it hasn't made a difference - so now I have ran out of ideas to resolve this.
Any help or suggestions will be greatly appreciated.
Gallery results with filter and Gallery results without filter
How are u populating your radio button options? Writing it by hand could create some problems. First i would recommend writing this in your Items property of your Radio button: Distinct('IT Forms', Status)
What it does is get all distinct values of "Status" and add them as options to your Radio.
And instead of having an if statement for each option of the Radio, you can:
SortByColumns( Filter( 'IT Forms', Status = Radio1_1.Selected.Result))
Try and see if it shows all data with this option.
And as far as i can understand you have to select "Form Number" to Filter the results by ID and "Form type" to search by title. But why not give the user the option to use all types at the same time? You can do this:
SortByColumns(
If(IsBlank(TitleInput) && IsBlank(IDInputText_1) && IsBlank(Radio1_1.Selected),
'IT Forms',
IsBlank(TitleInput) && IsBlank(IDInputText_1) && !IsBlank(Radio1_1.Selected),
Filter('IT Forms', Status = Radio1_1.Selected.Result),
IsBlank(TitleInput) && !IsBlank(IDInputText_1) && IsBlank(Radio1_1.Selected),
Filter('IT Forms', ID = IDInputText_1.Text),
!IsBlank(TitleInput) && IsBlank(IDInputText_1) && IsBlank(Radio1_1.Selected),
Search('IT Forms', TitleInput.Text, "Title"),
!IsBlank(TitleInput) && !IsBlank(IDInputText_1) && IsBlank(Radio1_1.Selected),
Filter(Search('IT Forms', TitleInput.Text, "Title"), ID = IDInputText_1.Text),
!IsBlank(TitleInput) && IsBlank(IDInputText_1) && !IsBlank(Radio1_1.Selected),
Filter(Search('IT Forms', TitleInput.Text, "Title"), Status = Radio1_1.Selected.Result),
IsBlank(TitleInput) && !IsBlank(IDInputText_1) && !IsBlank(Radio1_1.Selected),
Filter('IT Forms', ID = IDInputText_1.Text && Status = Radio1_1.Selected.Result),
!IsBlank(TitleInput) && !IsBlank(IDInputText_1) && !IsBlank(Radio1_1.Selected),
Filter(Search('IT Forms', TitleInput.Text, "Title"), Status = Radio1_1.Selected.Result && ID = IDInputText_1.Text)
), "Created", Descending)
Try it and tell me if it works for you or if you have any more questions. Best regards
Related
I've made a slicer connected to PivotTable with the option to choose type of change that will be displayed (pct. or abs.). I added to code in PowerPivot some SWITCH functions that would dynamically change formatting:
[...]
VAR pctg_chng =
IF(
ISBLANK(vol_current) && ISBLANK(vol_last);
BLANK();
DIVIDE(
vol_current;
vol_last
) - 1
)
VAR abs_chng =
IF(
ISBLANK(vol_current) && ISBLANK(vol_last);
BLANK();
vol_current - vol_last
)
VAR chng =
SWITCH(
TRUE();
IF(HASONEVALUE('Type'[Type]); VALUES('Type'[Type])) = "% chng."; pctg_chng;
IF(HASONEVALUE('Type'[Type]); VALUES('Type'[Type])) = "abs. chng."; abs_chng;
pctg_chng
)
VAR format_chng =
FORMAT(
chng;
SWITCH(
TRUE();
IF(HASONEVALUE('Type'[Type]);VALUES('Type'[Type])) = "% chng."; "# ##0.0%";
IF(HASONEVALUE('Type'[Type]);VALUES('Type'[Type])) = "abs. chng."; "# ##0.00";
"# ##0.0%"
)
)
RETURN
format_chng
It works fine, but in PivotTable there are blank values for some rows which should be automatically removed. In addition conditional formatting applied to table isn't displayed on it.
Is it possible to make anything out of it?
Thanks!
I had a function in PowerApps:
SubmitForm(Form1) && SubmitForm(Form2),
ResetForm(Form1) && ResetForm(Form2),
Navigate(Screen4;Fade))
This function was on the button, and it was responsible for sending forms, resetting data and showing the "complete" window.
I would however want to change this function so it would work only if Form1 is not blank (form 1 is a sharepoint multitext field that is required).
I tried to do it like that:
If(
IsBlank(Form1),
DisplayMode.Disabled,
DisplayMode.Edit
else
SubmitForm(Form1) && SubmitForm(Form2);;
ResetForm(Form1) && ResetForm(Form2);;
Navigate(Screen4;Fade)
)
or like that:
If( ! IsBlank( Form1),
SubmitForm(Form1) && SubmitForm(Form2);;
ResetForm(Form1) && ResetForm(Form2);;
Navigate(Screen4;Fade))
but I am getting ParenClose...
Could you please help me in making it work? I would love to have button greyed out if the Form1 does not have at least 1 symbol.
Form 1 is a sharepoint multitext field that is required
The blank statement needs to evaluate the string inside the field so you would need Form1.text
IsBlank(Form1.text)
hoping someone can point me in the right direction because I can't seem to make this work.
I've got a vertical gallery in my Canvas app that's connected to a customer list in SharePoint Online and I've got a text input box that I want to filter all customers that are in specific deployment phases (phase column is multiple choice in the SP list), I can get the filter to work like so:
Filter(
[#'MASTER SLM Customer Listings'],
DeploymentPhase.Value = "Phase 0 - Initiation" ||
DeploymentPhase.Value = "Phase 1 - Planning" ||
DeploymentPhase.Value = "Phase 2 - Build & Test" ||
DeploymentPhase.Value = "Phase 3 - Tune & Train" ||
DeploymentPhase.Value = "Phase 4 - Transition to Operational")
However, that doesn't achieve my end goal. When I try to do something like this, all sorts of errors are thrown and I can't work out the correct syntax. Also, I am very new to coding/developing apps of any sort.
"SortByColumns(
Filter(
[#'MASTER SLM Customer Listings'], StartsWith(DeploymentPhase.Value, searchBox.Text)), "Modified",Ascending)"
Ideally, This gallery will be searchable by Customer Name, only show customers in phases 0 - 4, and then sort them starting at Phase 0 and ascending to Phase 4. Any help in making this work would be greatly appreciated.
There is likely a better way to achieve this, but as I'm still learning PowerApps, this is the solution that I eventually figured out. Hopefully, this can help someone else.
Sort(
Filter(
Search(
'MASTER SLM Customer Listings',
searchBox.Text,
"Title"
),
DeploymentPhase.Value = "Phase 0 - Initiation" || DeploymentPhase.Value = "Phase 1 - Planning" || DeploymentPhase.Value = "Phase 2 - Build & Test" || DeploymentPhase.Value = "Phase 3 - Tune & Train" || DeploymentPhase.Value = "Phase 4 - Transition to Operational"
),
DeploymentPhase.Value,
Ascending
)
We have a PowerApps form with several fields that must be completed before the form can be submitted to the Sharepoint List.
We can't make them required or mandatory on the Content-Type and List because we want the users to be able tosave their data, and come back to it to edit it before Submitting...
So we need to disable/hide the Submit button until these fields are completed by the user.
In our Submit Button control we are using a formula to control the Visibility property of the button, or it's container which is the footer.
So we have tried this kind of thing:
If(
And(
TitleField.Text <> "",DescOfInitiativeField.Text <> "", DateRaisedField.SelectedDate <> Date(
1900,
01,
01
),
Not IsEmpty(PersonalDataChoiceField.SelectedItems.Value),
Not IsEmpty(SpecialCatChoiceField.SelectedItems.Value),
Not IsEmpty(ChildrensDataChoiceField.SelectedItems.Value),
Not IsEmpty(CriminalChoiceDataField),
Not IsEmpty(SourcesOfDataChoiceField.SelectedItems.Value),
but we are not having any luck..
So what's the correct way to go about this? How can we test that at least one of the options in each of our combo-box fields is selected?
I don't know why you add .Value after .Selecteditems
If(IsEmpty(ComboBox.SelectedItems),false,true)
It returns false when nothing is selected
Try something like this in your Visible function of your button:
If(IsBlank(TitleField.Text) Or IsBlank(DescOfInitiativeField.Text)
Or DateRaisedField.SelectedDate = Date(1900,01,01)
Or IsEmpty(PersonalDataChoiceField.SelectedItems)
Or IsEmpty(SpecialCatChoiceField.SelectedItems)
Or IsEmpty(ChildrensDataChoiceField.SelectedItems)
Or IsBlank(CriminalChoiceDataField)
Or IsEmpty(SourcesOfDataChoiceField.SelectedItems), false, true)
I am using lotus notes 8.5.2 on windows 7. I would like to create a custom view that shows all emails EXCEPT sent mail. In other words it contains: INBOX & ALL FOLDERS.
Currently my ALL DOCUMENTS view has the following formula conditions: SELECT #IsNotMember("A"; ExcludeFromView) & IsMailStationery != 1 & Form != "Group" & Form != "Person"
The SENT view has the conditions: SELECT DeliveredDate = "" & PostedDate != "" & !(#IsMember("S"; ExcludeFromView))
My thinking is that I should be able to exclude the SENT conditions from the ALL DOCUMENT condition ?
Thanks a lot
Taking all the documents that aren't in the Sent view isn't quite right, because there are a few documents that aren't in the Sent view that are also excluded from the All Documents view. The logic you want is:
SELECT (in the All Documents view) AND NOT (in the Sent view)
So, first make a copy of All Documents. You're going to keep the selection formula from the All Documents view, and put & !( ) after it, like this:
SELECT ( #IsNotMember("A"; ExcludeFromView) & IsMailStationery != 1 & Form != "Group" & Form != "Person" ) & !( )
Now, just copy the selection formula from the Sent view and put it between those empty parens, so the result is this:
SELECT ( #IsNotMember("A"; ExcludeFromView) & IsMailStationery != 1 & Form != "Group" & Form != "Person" ) & !( DeliveredDate = "" & PostedDate != "" & !(#IsMember("S"; ExcludeFromView)) )