Assign a variable dropdown search
Application Type
Reactive

Hello,

I'm beginning to create my first reactive application and i'm using a widget that i never used before and i'm having some difficulties to assign the variable. 

I have replaced an input widget with a dropdown search widget (never used this before) to select clients on a order form. But i can't save an order because the save bottom gives the following error:

The INSERT statement conflicted with the FOREIGN KEY constraint "OSFRK_OSUSR_T4S_ENCOMENDAS_OSUSR_T4S_CLIENTES_CLIENTEID". The conflict occurred in database "PKUQGD038", table "dbo.OSUSR_T4S_CLIENTES", column 'ID'. The statement has been terminated.

I would appreciate some guidance. Thank you

app.png

mvp_badge
MVP
Solution

Hi Vitor,


You are having this error because the ClienteId attribute of Encomendas entity is mandatory and is not being filled. 

On your DropdownSearchOnSelect function, you need to assign the selected value to GetEncomendaById.List.Encomendas.ClienteId.


Your assign should be GetEncomendaById.List.Encomendas.ClienteId = IntegerToIdentifier(TextoInteger(SelectedItem.Value)).


Kind Regards,
João

Thanks for the answer João!

I think i've done it as you said, but i still get the same error message. Any other suggestion?

app2.png

mvp_badge
MVP

Hi Vitor,


You have it the other way around. I meant do the assign like this:

Sorry João, my bad! Resultou, Obrigado pela ajuda!

mvp_badge
MVP

I'm glad I could help Vitor!


Good luck!
João

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.