Hi all,
I have the following issue:
On the first screen you can enter how many buildings there are. On another screen you select the building and enter additional information. The dropdown looks like this: Distinct(Filter(Objekt;EAP_Exists);Anz_Gebaeude)
After adding addtional info the field is written into a collection as gebaeude_id. the value is numeric.
And now the issue: when I try to load it into my SQL database I get the error, that the field content is not matching the content of the database field. No matter if I set the database field to VARCHAR or INT I get the same issue.
Text(gebaeude_id) is not working. Value(gebaeude_id) neither.
Powerapps can be really annoying sometimes
HI @DIECKBE
We can Patch SQL in Multiple Ways. The below code Creates or Update the record
With(
{
item: LookUp(
[@StudentTest],
StudentID = Value(DataCardValue12.Text)
)
},
If(
IsBlank(item),
Patch(
[@StudentTest],
{UserName: DataCardValue11.Text}
),
Patch(
[@StudentTest],
LookUp(
[@StudentTest],
StudentID = BrowseGallery1.Selected.StudentID
),
{UserName: DataCardValue11.Text}
)
)
)
Another approach to Update SQL, just passing ID without Lookup. In this Case StudentId is Primary Key
Patch(
[@StudentTest],
{
StudentID: BrowseGallery1.Selected.StudentID,
UserName: DataCardValue11.Text
}
)
Another Approach using Lookup (Not passing Primary key)
Patch(
[@StudentTest],
LookUp(
[@StudentTest],
StudentID = BrowseGallery1.Selected.StudentID
),
{UserName: DataCardValue11.Text}
)
Thanks,
Stalin - Learn To Illuminate
Hey Stalin 🙂
With the following script, I create data in the database
ForAll(Seilanlage;
Patch('inspdeve.dim_seilanlagen';Defaults('inspdeve.dim_seilanlagen');
{
ID: 0;
Objekt_ID: BV_Konto.Result;
// Gebaeude_ID: Gebaeude_ID.Text; <-- NOT WORKING
Gebaeudeteil_ID: Value(Gebaeudeteil_ID);
Gebaeudeteil_Beschreibung: Text(GebaeudeteilBeschreibung.Value);
Gebaeudeteil_Dachflaeche: Dachflaeche_ID;
Hersteller_ID: Text(Seilanlagen_Hersteller_ID);
Produkt_ID: Seilanlagen_Produkt_ID.Text;
Seriennummer:Seilanlagen_Seriennummer;
Seil_nr: Text(Seilanlagen_Seil_Nr);
Stuetze_von:Seilanlagen_Stütze_von;
Stuetze_bis:Seilanlagen_Stütze_bis;
Laenge:Seilanlagen_Länge;
Ueberfahrbar:If(Seilanlagen_Überfahrbar = "true";"Y";"N");
Herstellungsdatum:Seilanlagen_Herstellungsdatum;
Komponenten_ID:Seilanlagen_Komponenten_ID.Text;
Komponenten_Anz:Seilanlagen_Komponenten_Anzahl;
Standort: Text(SeilanlagenStandortText);
// Standort_foto_file: STANDORT;
// Standort_foto_text: Text(STANDORT);
gueltig_von: Today();
gueltig_bis: Date(2099;12;31);
DELETED: "N"
}));;
This field is causing issues: Gebaeude_ID.Text
Gebaeude_ID.Text is genreated here:
Collect(Seilanlage;{
BV_Konto: BV_Kontonummer.Selected;
Dachflaeche_ID:EAPDachflaeche_ID.Selected.Result;
Gebaeudeteil_ID: LookUp('inspdeve.dim_gebaeudeteil'; gebaeudeteil_bezeichnung = SeilanlagenGebaeudeteilDropDown.SelectedText.Value;gebaeudeteil_ID);
any more questions? Let me know 🙂
Thanks in advanced and best regards from Germany
Benny
User | Count |
---|---|
254 | |
106 | |
96 | |
51 | |
39 |