In this talk, I will introduce some results on uniqueness and numerical methods of identifying a smooth grating profile with a mixed or transmission boundary condition from phaseless data. The existing uniqueness result requires the measured data to be in a bounded domain. To break this restriction, we design an incident system consisting of the superposition of point sources to reduce the measurement data from a bounded domain to a line above the grating profile. We derive reciprocity relations for point sources, diffracted fields, and total fields, respectively. Based on Rayleigh's expansion and reciprocity relation of the total field, a grating profile with a mixed or transmission boundary condition can be uniquely determined from the phaseless total field data. An iterative algorithm is proposed to recover the Fourier modes of grating profiles at a fixed wavenumber. Some numerical examples are presented to verify the correctness of theoretical results and to show the effectiveness of our numerical algorithm.