Good night,
I have this form where I save records in a Sharepoint database, once I have saved the record I want the last record created to be selected so that I can continue adding information to that last record created. Currently the information records me but the gallery item is always selected
Solved! Go to Solution.
@CarlosN ,
This would be so mush easier with a form and I am wondering why you have not used one with such a big Patch, however if you do this below (note I OCR'd this, so just copy the top 2 lines and the last bracket)
Set(
vCurrRec;
Patch(
'Solicitudes Exprès';
Defaults('Solicitudes Exprès');
{
Cliente: TxtCliente_l.Text;
Nit : TxtNit_l.Text;
CodigoCliente: TxtCodCliente_l.Text;
Referencia: TxtReferencia_l.Text;
Producto: TxtProducto_l.Text;
VieneDe: TxtVieneDe_l.Text;
CopiarDe: TxtCopiorDe_l.Text;
Largo: TxtLargo_l.Text;
Ancho: TxtAncho_l.Text;
Alto: TxtAlto_l.Text;
Material : CBoxMaterioi_l.Selected.Material;
Cierre: DdownPegue_l.SelectedText.Value;
Estilo: DdownEstiLos_l.SelectedText.Value;
Color: DdownColores_l.SelectedText.Value;
Caras : DdownCaras_l.SelectedText.Value;
UsuarioVentas: DropUsuarioVentas_l.SelectedText.Result;
FechaCreacion: FechoSoicitud_l.SelectedDate;
EmailUsuario: LblEmail_l.Text;
CiudadDespacho: TxtCiudodDespacho_l.Text;
Observacion: TxtObservaciones_l.Text;
Planta: LblPlanto_l.Text
}
)
);;
UpdateContext({ColorBt:true})
then you should be able to display the record you would need by setting the Default of each control to (examples) Cliente
vCurrRec.Cliente
Nit
vCurrRec.Nit
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @CarlosN ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Good Afternoon @CarlosN (Sunday here),
You can do this, but a probably bit of a change to your current structure.
Firstly, the OnSelect of the Gallery should be this (call the Variable whatever you want)
Set(vID, ThisItem.ID)
Then the Item of the form
Lookup(
YourListName,
ID=vID)
)
now you have done this, you can display on the form whatever record the ID equals vID, so on the OnSuccess of the form
Set(
vID,
YourFormName.LastSubmit.ID
)
and this will display the record you have just created.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi Warren,
Thanks for your hepl.
But it is not an edit form, they are text boxes, drop-down lists, ...
Hi @CarlosN ,
That is going to make it a bit more difficult. How do you display existing records in them and what is your Patch code you use for new records?
@CarlosN ,
This would be so mush easier with a form and I am wondering why you have not used one with such a big Patch, however if you do this below (note I OCR'd this, so just copy the top 2 lines and the last bracket)
Set(
vCurrRec;
Patch(
'Solicitudes Exprès';
Defaults('Solicitudes Exprès');
{
Cliente: TxtCliente_l.Text;
Nit : TxtNit_l.Text;
CodigoCliente: TxtCodCliente_l.Text;
Referencia: TxtReferencia_l.Text;
Producto: TxtProducto_l.Text;
VieneDe: TxtVieneDe_l.Text;
CopiarDe: TxtCopiorDe_l.Text;
Largo: TxtLargo_l.Text;
Ancho: TxtAncho_l.Text;
Alto: TxtAlto_l.Text;
Material : CBoxMaterioi_l.Selected.Material;
Cierre: DdownPegue_l.SelectedText.Value;
Estilo: DdownEstiLos_l.SelectedText.Value;
Color: DdownColores_l.SelectedText.Value;
Caras : DdownCaras_l.SelectedText.Value;
UsuarioVentas: DropUsuarioVentas_l.SelectedText.Result;
FechaCreacion: FechoSoicitud_l.SelectedDate;
EmailUsuario: LblEmail_l.Text;
CiudadDespacho: TxtCiudodDespacho_l.Text;
Observacion: TxtObservaciones_l.Text;
Planta: LblPlanto_l.Text
}
)
);;
UpdateContext({ColorBt:true})
then you should be able to display the record you would need by setting the Default of each control to (examples) Cliente
vCurrRec.Cliente
Nit
vCurrRec.Nit
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @CarlosN ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Good Morning, I have not tried it yet, as soon as I have a while to run it I have had other problems that I have not resolved. I will continue consulting the powerapps community to solve my doubts.
User | Count |
---|---|
257 | |
110 | |
97 | |
52 | |
39 |