cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Dmax fuction in power apps

How to create data form in power apps that roll number is auto update with changing the sectionHow to create data form in power apps that roll number is auto update with changing the section

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Dmax fuction in power apps

Hi @Hasnain_Haider :

Could you tell me:
What controls are you showing? How is it set up?
What is your data source? What is it's data structure?
How do you choose records?
How do you modify records?

In addition, if the control you show is data table control, I'm afraid edit data in the Data table control is not available.

Not yet available

Best Regards,

Bof

View solution in original post

11 REPLIES 11
Highlighted
Community Champion
Community Champion

Re: Dmax fuction in power apps

Try insert a label and on the text property put:

Max(Table1,ID)+1

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Regular Visitor

Re: Dmax fuction in power apps

it does not work because it did not depend upon on class and section. 

Highlighted
Community Champion
Community Champion

Re: Dmax fuction in power apps

Can you give further explanation

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Regular Visitor

Re: Dmax fuction in power apps

REW-B-00001

REW-B-00002

REW-C-00001

REW-B-00003

REW-C-00002

I want this type of dataUntitled.png

When I select class two or three time with same section then roll no is coming 1,2,3 . After this when i change the class and section then the roll no is again coming 1( I want this), I hop you understand my question. If not please send your gmail id i create a video of my question and send you

Highlighted
Microsoft
Microsoft

Re: Dmax fuction in power apps

Hi @Hasnain_Haider :

Do you want to automatically populate the  "Roll No" based on Class and Section ?

I’ve made a test for your reference:

Case1: Every time the white Class and Section, Roll No is reset to 1

1\Add two TextInput controls(TextInput6\TextInput6_1)

 

 

OnChange: Set(var,1)    /*Var is my custom variable, when the text in the control changes, the value of the variable changes to 1*/

 

 

2\Add a button

OnSelect:

 

 

Collect(
    mytable,
    {
        Class: TextInput6.Text,
        Secition: TextInput6_1.Text,
        'Roll No': var
    }
);   /*Use the collect control to create records*/
Set(
    var,
    var + 1
)   /*Each time a record is generated, the variable increments by 1*/

 

 

 

Case2: Set Roll No dynamically according to the record in the table

1\Add two Text controls(TextInput6\TextInput6_1)

2\Add a button

OnSelect:

 

 

Collect(
    mytable,
    {
        Class: TextInput6.Text,
        Secition: TextInput6_1.Text,
        'Roll No': CountRows(
            Filter(
                mytable,
                Class = TextInput6.Text,
                Secition = TextInput6_1.Text
            )
        ) + 1
    }
);

 

 

Case2.png

Best Regards,

Bof

Highlighted
Regular Visitor

Re: Dmax fuction in power apps

Sir it not work 

Highlighted
Regular Visitor

Re: Dmax fuction in power apps

Sir If you not create a data table you create the textinput1 or textinput2 how auto roll no is formed. And if you create a data table why you type textinput6 or textinput_6 after the class and section. I hope you understand my question.

Highlighted
Microsoft
Microsoft

Re: Dmax fuction in power apps

Hi @Hasnain_Haider :

Could you tell me:
What controls are you showing? How is it set up?
What is your data source? What is it's data structure?
How do you choose records?
How do you modify records?

In addition, if the control you show is data table control, I'm afraid edit data in the Data table control is not available.

Not yet available

Best Regards,

Bof

View solution in original post

Highlighted
Regular Visitor

Re: Dmax fuction in power apps

I tell you in detail i create a data table which consist on 2 field these are class and section ,the field of the class is dropdown that contain data class1,class2,class3,and class4,and section is also dropdown that contain data Section A,Section B,Section C.I want that when i select class which depend upon on section for example(When i select 2 or 3 time with same class name i.e class 1 with same section i.e A then the Roll no is come 1,2,3 when i change the section i.e B then the roll No is Coming 2) I want this So please help me.I hope you understand my question

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,331)