Hello!
Right now in my gallery I sort on an text column where my colleges insert todays date and time. My gallery in sorted descending on this column.
The problem is when the app get more than 500 objects is about for example 5 days, that object with the status "Transfer to future date" will dissapear. I dont want more than 500 objects at once in the app because of performance issues if its above that threeshold.
So to the question: Is there anyway to sort on the "Status" in secondhand somehow? SortByColumns or something? I want to object with the status "Transfer to future date" to always be visible in my app no mather what.
This is the sortfunction I use now:
Filter(
Sort(
Logg;
'Case received';
Descending
)
Appreciate the help, thanks!
Hi @Anonymous ,
You can use Like below.
First Ways.
Filter(
Sort(
Logg;
'Case received';
Descending
),Status="Transfer to future date");
Thanks,
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
@VijayTailor Sorry, this wont work for me. I dont think this is what i'm searching for.
I want the status: "Trasfer to future date" to always be visible in my gallery and also be able to sort on "Case received".
Maybe its a problem when i'm trying to implement this on my full code?
If(
'Toggle'.Value;
Filter(
Sort(
Logg;
'Case received';
Descending
);
TextInput1.Text in 'Case number';
Avtalsområde.Value = "EAST" ||
Avtalsområde.Value = "WEST";
Status.Value in "Ongoing
);
Filter(
Sort(
Logg;
'Case received';
Descending);
TextInput1.Text in 'Case number';
Avtalsområde.Value in ComboBox2.SelectedItems.Value; Status.Value in 'Sort on status'.SelectedItems.Value &&
If(Status.Value in "Finished"; 'Created'>=Today();true)
||
If(Status.Value in "Finished" && ToggleOldData.Value=false; 'created'>=Today();true)))
Hi @Anonymous
For this Requirment -
YOu can set the ComboBox DefaultSelectedItem Property is Like that way ["Trasfer to future date""].
And use the Condition Like below.
YOu can Try Like Below.
if (IsBlank(TextInput1.Text) || IsEmpty(TextInput1.Text),
Filter(
Sort(
Logg;
'Case received';
Descending);
TextInput1.Text in 'Case number';
Avtalsområde.Value in ComboBox2.SelectedItems.Value; Status.Value in 'Sort on status'.SelectedItems.Value && Created=Today(),Filter(
Sort(
Logg;
'Case received';
Descending
);
TextInput1.Text in 'Case number';
Avtalsområde.Value = "EAST" ||
Avtalsområde.Value = "WEST";
Status.Value in "Ongoing
);)
Thanks,
@VijayTailor Hello again, sorry for late replay
I dont really understand your code, it doesnt work for me when i'm trying it. Some things seems to be missing.
I dont think you really understand what i'm trying to accomplish, I will try to explain further.
This is a Servicedesk support app i'm creating. There will be about 100 objects each day thats created.
The problem is:
Some cases have an status "Transfer to future date" that can be a week from now and by that time the app will have 700 cases and that older case "Transfer to future date" will be gone. Is there anyway to make that status be sorted on firsthand?
Something like this?:
Sort(
Logg;
Status.Value="Transfer to future date";
Descending;
'Case received';
Descending);
Hi @Anonymous,
As per below Post your issue is Like.
You can to filter the records having the status "Transfer to future date" and Suppose expire date is yesterday.
So you open App today you want to see all the Record having the above status and future date is passed/Expired.
See the Approach to archive the expected Outcome.
AddColumns(Filter(TestAkshay,Complexity.Value="Transfer to future date"),"DaysExpired",If(DateDiff(DateField,Today())>=1,"Expired","NE"))
Thanks,
Hi @Anonymous :
Do you want to rank the records whose'status' value is "Trasfer to future date" based on the original formula?
If so,just nest another Sort outside.Please try this code:
Sort(
If(
'Toggle'.Value;
Filter(
Sort(
Logg;
'Case received';
Descending
);
TextInput1.Text in 'Case number';
Avtalsområde.Value = "EAST" ||Avtalsområde.Value = "WEST";
Status.Value in "Ongoing
);
Filter(
Sort(
Logg;
'Case received';
Descending
);
TextInput1.Text in 'Case number';
Avtalsområde.Value in ComboBox2.SelectedItems.Value;
Status.Value in 'Sort on status'.SelectedItems.Value && If(Status.Value in "Finished"; 'Created'>=Today();true) || If(Status.Value in "Finished" && ToggleOldData.Value=false; 'created'>=Today();true)
)
);
If(status="Trasfer to future date";1;0);
Descending
)
Best Regards,
Bof
@v-bofeng-msft Hello! Yes, thats exacly what I want. But I recently started using ClearCollect instead and this doesnt work with ClearCollect. My formula for ClearCollect looks like this today:
Set(ManuellUppdateringSpinner;true);; ClearCollect(CollectLogg;Sort('Logg';'Case Receivec';Descending));;Set(ManuellUppdateringSpinner;false)
Can I make the Clearcollect first get all the statuses "Transfer to future date" and then sort on "Case received" ? Something like this? (Doesnt work but i tried):
Set(ManuellUppdateringSpinner;true);; ClearCollect(CollectLogg;Sort(Sort('Logg';If(Status.Value = "Transfer to future date";1;0);Descending);'Case Received';Descending
);;Set(ManuellUppdateringSpinner;false))
Hi @Anonymous :
Could you tell me:
I tested this method should be feasible.
Considering that your data source may have more than 500 or more than 2000 records, and this formula has is not delegable. I suggest you sort ‘Case Received’ first, and then sort ‘Status.Value’ (this can reduce the impact of not being able to delegate).For example:
Set(ManuellUppdateringSpinner;true);;
ClearCollect(
CollectLogg;
Sort(
Sort(
'Logg';
'Case Received';
Descending
);
If(Status.Value = "Transfer to future date";1;0);
Descending);;
Set(ManuellUppdateringSpinner;false))
Best Regards,
Bof
My source is a Sharepoint list
With "not work" i mean by the records with the column "Transfer to future date" doesnt seem to be fetched. No red error warnings.
Its on the property OnSelect in an icon
I tested your provided code but still doesnt seem to fetch the status "transfer to future date" 😞
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |