Skip to main content

Notifications

Power Platform Community / Forums / Building Power Apps / Explicit column select...
Building Power Apps
Unanswered

Explicit column selection arbitrarily and irreversibly truncating record

Posted on by 603

In code below I can choose one of these lines (by commenting out the other)

;;Set(gAsiel_verblijf;Last(Filter(SortByColumns('[dbo].[asiel_verblijf]';"asiel_verblijf_id";Ascending);dier_id=gDierRecord.dier_id)))
//;;Set(gAsiel_verblijf;LookUp('[dbo].[asiel_verblijf]';dier_id=gDierRecord.dier_id))

 

If I choose the first line like here the record gDierRecord in the code below, which is a record from a completely different table looses all columns but 3 (as seen in when inspecting the record in the interface). All other columns do not produce errors but are just empty. The record cannot be revived by changing the code back and/or by

;;Refresh('[dbo].[dier]')
;;Set(gDierRecord;Blank())
;;Set(gDierRecord;Defaults('[dbo].[dier]'))
;;Set(gDierRecord;LookUp('[dbo].[dier]';identificatie_nummer_asiel=Value(cZoekterm)))

 

This error only presents itself with explicit column selection enabled.

The ditched columns are widely used in the app, I really miss them.

If explicit column selection becomes natural behavior I am .. unhappy.

 

 

 

 

Set(gDierRecord;Defaults('[dbo].[dier]'))
;;Set(gDierExtraRecord;Defaults(DierExtra))
;;Set(DitDierVerblijfStatus;-4)
;;Set(ExplainVerblijfStatus;"onbepaald")
;;If(
ViewMode=1;
Set(gDierRecord;LookUp('[dbo].[dier]';identificatie_nummer_asiel=Value(cZoekterm)))
;;If(!IsBlank(gDierRecord);
Set(gDierExtraRecord;LookUp(DierExtra;DocaNummer=gDierRecord.dier_id))
;;If(IsBlank(gDierExtraRecord);Patch(DierExtra;Defaults(DierExtra);{DocaNummer:gDierRecord.dier_id;Dier:""}))
;;Set(gDierExtraRecord;LookUp(DierExtra;DocaNummer=gDierRecord.dier_id))
)
)
;;Set(gAsiel_verblijf;Last(Filter(SortByColumns('[dbo].[asiel_verblijf]';"asiel_verblijf_id";Ascending);dier_id=gDierRecord.dier_id)))
//;;Set(gAsiel_verblijf;LookUp('[dbo].[asiel_verblijf]';dier_id=gDierRecord.dier_id))
;;If(!IsBlank(gAsiel_verblijf)
;Set(gKennel_asiel;LookUp(CachedKennelAsiel;kennel_asiel_id=gAsiel_verblijf.kennel_asiel_id))
;;If(!IsBlank(gAsiel_verblijf)
;Set(gKennel_groep_asiel;LookUp(CachedKennelGroepAsiel;kennel_groep_asiel_id=gKennel_asiel.kennel_groep_asiel_id))
;;Set(gAsiel_verblijf_extra;LookUp(CachedAsielVerblijfExtra;asiel_verblijf_id=gAsiel_verblijf.asiel_verblijf_id))
)
)
;;Set(RefreshDier;false)
;;UpdateContext({LftString:""})
;;UpdateContext({LftWeken:0})
;;UpdateContext({LftDagen:If(gDierRecord.geboortedatum>0;Today()-gDierRecord.geboortedatum;0)})
;;UpdateContext({LftJaren:RoundDown(LftDagen/365,25;0)})
;;UpdateContext({LftRestDagen:LftDagen-(LftJaren*365,25)})
;;UpdateContext({LftRestMaanden:RoundDown(LftRestDagen/30,5;0)})
;;If(
LftJaren=0
;UpdateContext({LftWeken:RoundDown(LftDagen/7;0)})
;;UpdateContext({LftRestDagen:Round(LftDagen-(LftWeken*7);0)})
;;UpdateContext({LftString:If(
LftWeken<16
;Text(LftWeken) & " wk" & If(LftRestDagen>0;" " & Text(LftRestDagen) & " dg";"")
;Text(LftRestMaanden) & " mnd"
)})
;UpdateContext({LftString:Text(LftJaren) & " jr" & If(LftRestMaanden>0;" " & Text(LftRestMaanden) & " md";"")})
)
;;If(!IsBlank(gAsiel_verblijf)
;If(
gDierRecord.overledendatum > DateValue("01-01-2000")
;Set(DitDierVerblijfStatus;-2)
;Set(DitDierVerblijfStatus;
If(
gAsiel_verblijf.vertrek_datum > DateValue("01-01-2000")
;-1
;gAsiel_verblijf.asiel_verblijf_status_id

)
)
))
;;If(IsBlank(DitDierVerblijfStatus);Set(DitDierVerblijfStatus;-3))
;;Set(
ExplainVerblijfStatus
;Switch(
DitDierVerblijfStatus
;-4;"onbepaald"
;-3;"niet gevonden"
;-2;"overleden"
;-1;"geplaatst"
;4;"Afstandsdier"
;8;"In beslagname"
;Text(DitDierVerblijfStatus)
)
)

 

  • v-siky-msft Profile Picture
    v-siky-msft on at
    Re: Explicit column selection arbitrarily and irreversibly truncating record

    Hi @HansHeintz ,

     

    Currently, It is not supported to allow  "Explicit column selection" and  "Improved data source selection and Common Data Service views " features work together, you have to disabled one. Reference: https://powerapps.microsoft.com/en-us/blog/improved-data-source-selection-and-common-data-service-views/ 

     

    Snipaste_2019-12-31_11-36-39.png

    Sik

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Tuesday Tip #1 Subscribing to Forums…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 141,450

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,467

Leaderboard