cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alexaristide
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
mdevaney
Super User
Super User

@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.,

v-siky-msft
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

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,245)