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

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

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (61,570)