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

Get the previous values of an item, and add the new values of to item after submiting form

Hello Community

 

I need to know if there is a way of adding the previous value of an multiple choice plus the new value added from a new submit  form. How the form works is that it search into 'Número de Nómina' column and if the value  exists it only update the old values to the new one. So i need that when you want to add a previous user that matches the  'Número de Nómina' value it checks when an existing item is already into  'Número de Nómina', So is there a way to get the previous value of the applications and the the new value together in the sharepoint list when a new form is submited?

 

HectorOlivos_1-1659024520297.png

 

HectorOlivos_3-1659025087819.png

 

 

 

 

 

If(
    IsBlank(
        LookUp(
            UsuariosApps,
            'Número de Nómina' = txt_Número_de_Nómina.Text
        )
    ),
    Patch(
        UsuariosApps,
        Defaults(UsuariosApps),
        {
            'Número de Nómina': txt_Número_de_Nómina.Text,
            'Unidad de Negocio': drp_Unidad_De_Negocio.Selected,
            'Nombre Completo Usuario': txt_Nombre_Completo_Usuario.Text,
            Planta: drp_Planta.Selected,
            Área: txt_Área.Text,
            Puesto: txt_Puesto.Text,
            'Applicaciones ': drp_Aplicaciones.SelectedItems,
            'Correo Jefe Inmediato': txt_Correo_Jefe_Inmediato.Text
        }
    ),
    Patch(
        UsuariosApps,
        LookUp(
            UsuariosApps,
            'Número de Nómina' = txt_Número_de_Nómina.Text
        ),
        {

            'Unidad de Negocio': drp_Unidad_De_Negocio.Selected,
            'Nombre Completo Usuario': txt_Nombre_Completo_Usuario.Text,
            Planta: drp_Planta.Selected,
            Área: txt_Área.Text,
            Puesto: txt_Puesto.Text,
            'Applicaciones ': drp_Aplicaciones.SelectedItems,
            'Correo Jefe Inmediato': txt_Correo_Jefe_Inmediato.Text
        }
    )
);


Navigate(SuccessScreen); ResetForm(Formulario_Alta_Usuario_en_Aplicaciones)

 

 

 

HectorOlivos_2-1659024917741.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @HectorOlivos,

Do you want to get the previous value after you submit the form?

 

Actually, you could get the current value before you submit form, however if you have submitted the form, you could only get the latest submitted value.

Best Regards,
Qi

View solution in original post

2 REPLIES 2
annajhaveri
Community Champion
Community Champion

@HectorOlivos  i am not sure i follow the exact requirement, are you looking to append values to applications  fields when new item is created? When item is new, how will it have previous values?

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
v-qiaqi-msft
Community Support
Community Support

Hi @HectorOlivos,

Do you want to get the previous value after you submit the form?

 

Actually, you could get the current value before you submit form, however if you have submitted the form, you could only get the latest submitted value.

Best Regards,
Qi

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,991)