About c# writePoint

Hi,
How to set fields with condition ? If we have some empty fields.
like
if (fieldA is not null)
Field(“fieldA”, 55A);

        if (fieldB is not null)
          Field("fieldB", 55B);
 
 // online sample is always initiate setting
    // Write by Point
            //
            var point = PointData.Measurement("temperature")
                .Tag("location", "west")
                .Field("value", 55D)
                .Timestamp(DateTime.UtcNow.AddSeconds(-10), WritePrecision.Ns);
            writeApi.WritePoint("bucket_name", "org_id", point);

Hello @Erikson,
You’d have to create that conditional logic outside of the point method. There’s no conditional option within it.
Thank you.

@Anaisdg ,

Got it, thanks.