cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

correlate formula

Hello community, I have an SPList named "Ingresos", and a field called "Clase" dropdown box type, so The document has a number of document wich is in the field named "Numero", then each value of the "Clase "dropdown box has a different value in "Numero".. but all of them are correlate values........., So I would like to suggest the next value in the "Numero" field when the Form is in NEW mode.., I I mean whtn I add records the field "Numero" suggests the next value...,(according to the "Clase" )

 

thank you

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @alexaristide ,

 

Ok, so the Clase column is choices type, right?

Please try this, set the Numero field Default value based on Clase dropdown selected value.

If(FormName.Mode = FormMode.New,
    If(ClaseDropdowName.Selected.Value="A",
        If(1001 in Filter(Ingresos,Clase.Value="A").Numero,
            Last(Sort(Filter(Ingresos,Clase.Value="A"),Numero,Ascending)).Numero+1,
            1001),
        ClaseDropdowName.Selected.Value="B",
         If(1001 in Filter(Ingresos,Clase.Value="B").Numero,
            Last(Sort(Filter(Ingresos,Clase.Value="B"),Numero,Ascending)).Numero+1,
            1001),
     )
Parent.Default
)

Hope this helps.

Sik

 

View solution in original post

5 REPLIES 5
Super User III
Super User III

@alexaristide 
Could you please give a few specific examples of how the Numero value is determined with actual numbers?

the Numero value is a correlative number of document.., for example, 1001, 1002, 1003, 1004, etc.,

Community Support
Community Support

Hi @alexaristide ,

 

May I understand that you want to set the Numero field to be AutoNumber like this?

GIF_69.gif

Please try to modify the Default property of TextInput box in Numero DataCard as follows.

If(FormName.Mode = FormMode.New,If(1001 in Ingresos.Numero,Last(Sort(Ingresos,Numero,Ascending)).Numero+1,1001),Parent.Default)

 Hope this helps.

Sik

I am afraid this solution works in order to have the NEXT value of Numero..,. but, there are two "classes" of Numero, I mean there are in the CLASE field (dropdown box type) two values for the document.., so, I need to validate when it is for the next value of number for the document CLASE A, and when the document is of CLASE B, each correlative is different..,

 

CLASE is a dropdown box type column wich contains two values (A, B),

 

thank you

Hi @alexaristide ,

 

Ok, so the Clase column is choices type, right?

Please try this, set the Numero field Default value based on Clase dropdown selected value.

If(FormName.Mode = FormMode.New,
    If(ClaseDropdowName.Selected.Value="A",
        If(1001 in Filter(Ingresos,Clase.Value="A").Numero,
            Last(Sort(Filter(Ingresos,Clase.Value="A"),Numero,Ascending)).Numero+1,
            1001),
        ClaseDropdowName.Selected.Value="B",
         If(1001 in Filter(Ingresos,Clase.Value="B").Numero,
            Last(Sort(Filter(Ingresos,Clase.Value="B"),Numero,Ascending)).Numero+1,
            1001),
     )
Parent.Default
)

Hope this helps.

Sik

 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (31,293)