Questions tagged [defaultifempty]

40 questions
1
vote
1 answer

Set property to empty - SAP CRM WebUI

I am new to SAP, and am encountering an issue I am not sure how to resolve. I am setting a property to '' (empty), but it is not being displayed as such. There is existing logic that sets specific fields to 'Display Only' when a checkbox is checked.…
EAB769
  • 101
  • 8
1
vote
0 answers

System.Linq.Dynamic left outer join (IQueryable method)

I have a one problem and i hope you can explain me the solution! I want to make left outer join between two dynamic classes. I generate two classes at runtime and add its configuration into entityContext: public DbModelBuilder…
paranamix
  • 11
  • 1
1
vote
0 answers

LINQ DefaultIfEmpty should return array of object with null value

I have this LINQ query: Dim JoinedResult = LeftTable.GroupJoin(RightTable, Function(LeftTableRow) LeftTableRow(FieldIndexInLeftTable), _ Function(RightTableRow) RightTableRow(FieldIndexInRightTable), _ …
derstauner
  • 1,478
  • 2
  • 23
  • 44
1
vote
1 answer

Defaultifempty seems to work in linq to entities

I'm new to linq and linq to entities so I might have gone wrong in my assumptions, but I've been unknowingly trying to use DefaultIfEmpty in L2E. For some reason if I turn the resultset into a List, the Defaultifempty() works I don't know if I've…
Rand
  • 39
  • 2
  • 6
1
vote
1 answer

Linq force load entities with DefaultIfEmpty gives ObjectDisposedException

I have this linq: using (PlantContext context = ContextManager.GetPlantContext(plantId.PlantPath)) { results = (from p in context.Plants join subplant in context.Subplants on p.Id equals subplant.PlantId …
Paul
  • 193
  • 1
  • 11
1
vote
2 answers

LINQ DefaultIfEmpty issue on object with non-nullable value type property

Requirement I need to join Table1 and Table2 The key between two tables are ID which is System.Guid type and is non-nullable value type If Table2.ID is null, I need to get null record from Table1. LINQ syntax I wrote is as follows. from records in…
ideacreek
  • 21
  • 3
0
votes
1 answer

Linq 3 Table GroupJoin DefaultifEmpty Query

my Tables Hotel ID Name Price PriceID HotelID Price(decimal) StartDate Discount HotelID DiscountID DiscountType DiscountRate The relationship Hotel and price 1 x n The relationship Hotel and discount 1 x n but price can be Null and Discount…
0
votes
2 answers

Add dictionary if key value is empty using python

I have a dictionary with missing values (the key is there, but the associated value is empty). For example I want the dictionary below: dct = {'ID': '', 'gender': 'male', 'age': '20', 'weight': '', 'height': '5.7'} to be changed to this form: dct =…
learner
  • 39
  • 3
0
votes
0 answers

Average extension method in Linq for null value

I am facing problem in handling average of empty list. var groupJoin = studentList.GroupJoin(resultList, //inner sequence studentKeySelector => studentKeySelector.id, //outerKeySelector …
0
votes
1 answer

Omitempty field is not working, how to remove empty structs from the response body?

type PolicySpec struct { Description string `json:"description" yaml:"description"` EndpointSelector Selector `json:"endpointSelector,omitempty" yaml:"ingress,omitempty"` Severity int …
0
votes
1 answer

Is there a way to set the default value(0 instead of null) for a group join IN THE LINQ QUERY itself?

I got a LINQ query that includes two tables while some of the records aren't included in the child table. I'm already using GROUP JOIN with DEFAULTIFEMPTY() and it used to work before i added the Table ITM_WH which returns Numeric Sum. how could i…
Charles
  • 31
  • 3
0
votes
2 answers

Default Meta description from other Properties (when empty) - EPiServer

I am working on an EPiServer 5 project and I need to fill in the meta-description property of my page type with data from other properties. E.g. Take the first sentence of the body and use it as meta description" This should be done if the editor…
tif
  • 1,109
  • 2
  • 12
  • 32
0
votes
0 answers

script and formula for timestamp when a check mark is filled

I saw this response (below) from a poster responding to a request for an automatic timestamp when a cell is filled out. I've added this script as a new project in Google Sheets. My question is, what is the formula to use in the cell where I want…
0
votes
1 answer

how to set default none.png image if input file empty php

I tried to apply none.PNG if input file empty and i use statement like this. I need to fix this to use it in my systems. thank you. if(empty($image)){ $name = md5(time() . rand(0, 999)) . '.jpeg'; }else{ $name = 'none.jpeg'; } public function…
Ali AAti
  • 25
  • 1
  • 8