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)
)
)
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-vi...
Sik
Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
Did you miss the call?? Check out the Power Apps Community Call here!
User | Count |
---|---|
255 | |
205 | |
76 | |
37 | |
31 |
User | Count |
---|---|
336 | |
214 | |
119 | |
71 | |
55 |